Blogs

KACE K1000 Script to uninstall all versions of iTunes

I discovered that the K1000 msi configuration policy uninstaller fails to work for iTunes version 12 (it worked for 11, why it no longer works, I don't know).
When I ran the script created by the policy, it ran successfully (so it said), but inventory showed iTunes still installed. Bummer.
So I turned to the old standby, VBScript to uninstall it.
Here it is if anyone needs it:
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set WshShell = CreateObject("wscript.Shell")

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each subkey In arrSubKeys
strDisplayName = WshShell.RegRead ("HKLM\" & strKeyPath & "\" & subkey & "\DisplayName")
If strDisplayName = "iTunes" Then
WshShell.Run "msiexec.exe /X " & SubKey & " /qn", 7, True
End If
Next

Be the first to comment

What is “System File Checker Tool” or “sfc”?

System file checker is a windows system utility that permits users to repair and restore the Windows system files. This is embedded in all Windows NT series operating systems. System file checker is a command line utility for all Windows operating systems series. The sfc.exe checks specific folder path including boot folders and windows folders. SFC is the integral part of Windows system protection.

If tool finds any problem, it tries to replace the error files from DLL Cache. If the file is not found in the DLL Cache or if the Cache is corrupted, the user needs to provide the network installation path or any Windows installation media. Let’s see how to run the tool and fix the system file issues using it.

Note: System File Checker solves the issue in most of the cases. When MS Outlook Unable to send emails after upgrading the Window 10 and also sometimes Sending reported 0x800CCC13 occurs.

How to run sfc.exe?

sfc.exe is a simple command which can be executed from Command prompt of the Windows Operating System. The command is as follows:

  • sfc/<space>scannow

Steps to run sfc.exe tool

  1.  Run command prompt with administrative privilege. For this do: Start >> cmd >> right click on it and then select “Run as Administrator
  2. After opening command prompt execute the command ‘sfc/scannow’.

nXd1v6.png

 TIP: Do not exit command prompt until the scanning is completed fully.

This command scans all protected system files and replaces corrupted ones with cached copy. The cached copy of the files will be located in a compressed folder at: %WinDir%\System32\dllcache

 ®     ‘%WinDir%’ is the placeholder for the Windows operating system folders.

The four possible output conditions for sfc.exe execution are

  • WRP doesn’t fine any integrity violations so that the system files are in healthy condition.
  • WRP is unable to perform the requested action, this can happen if PendingRenames or PendingDeletes folders exist under temp files.1RFI5G.png
  • WRP successfully repaired the corrupted files and the details are included in CBS.Log files.buFzXr.png
  • WRP is unable to repair the corrupted system files and the details exist in CBS.Log files.cUexJE.png

How to View and analyze the CBS.log file?

The contents from this log file can be copied to text file to analyze the corrupted file details. The extraction of the contents from log file to txt file can be carried out using Findstr command. For this operation open command prompt and execute the following:

pJBI6s.png

This command copies the content of the CBS log file to a new text file named sfc_contents.txt on desktop. So that user can easily read the contents using any text editors. This file contains date time and other SFC details. One can view and analyze the details obtained by executing the sfc.exe tool.

Is there any solution to replace the corrupted files?

Let’s see if there exists any solution to repair the corrupted system files where the SFC tool failed.  One possible solution is to replace the corrupted file with known good copy from other system running the same OS as that of yours. Let’s see how to carry out this task.

1.First take the administrative privilege from the damaged file. To do this Open command prompt, then execute: takeown /f FileNameWithPath
2.To grant admins full access  to the file execute the following query: icacls FileNameWithPath /GRANT ADMINISTRATORS:F
3.To replace the damaged file with healthy file do: Copy SourceFilePath DestinationPath

Conclusion

The article described about how to recover corrupted Windows System Files using System file Checker Tool. The tool is capable of fixing all types of files corruptions. This is as free command line utility from Microsoft and can be used by anyone to fix the stem file errors. The tool automatically replaces the corrupted system files from DLL cache file.

Be the first to comment

KACE: Silent removal of unresponsive Kace agents

When Kace agents become unresponsive, due to eg hibernation of the laptop are broken configuration it needs to be uninstalled.

 

Here is a tool to silently uninstall agents from multiple computers at once over the network with no user notifications or user interaction.
The computers need to be connected to the network.

 

The script uses the PSexec util found on https://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec's most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.

Note: some anti-virus scanners report that one or more of the tools are infected with a "remote admin" virus. None of the PsTools contain viruses, but they have been used by viruses, which is why they trigger virus notifications.

Installation: Save PsExec to a folder of your choice.  For me it's c:\temp Just be sure to adjust the command accordingly if you place PSexec somewhere else.
note: Typing "psexec" displays its usage syntax.

 

Script requisites

1. Computer list
create a text file called computerlist.txt, and type all computer names needing the Kace agent removal in there.  Should you want to use IP addresses instead of machine names, that is no problem  

save this file in the same location as your PSexec.exe file

2. Removal script
create a bat file called ampuninstall.bat and add the following 2 lines      

cd C:\Program Files\dell\kace
AMPTools uninstall all
 

save this batch file in the same location as your PSexec.exe file and the computerlist.txt
 

IMPORTANT - this is for x86 computers
in case of x64 computers be sure to change the program files folder location

cd C:\Program Files (x86)\dell\kace
AMPTools uninstall all
 

save this batch file in the same location as your PSexec.exe file and the computerlist.txt

 

note: see https://support.software.dell.com/k1000-systems-management-appliance/kb/146458 for more AMPTools command switches


3. Script

for /f %G in ('type "c:\temp\computerlist.txt"') do psexec \\%G -s -c -accepteula ampuninstall.bat

 

run the script by opening a command prompt and browse to your folder where PSexec is placed into - for me it's c:\temp.
should you use a different location, be sure to to adjust the command accordingly. 
 

explanation of the script

-s = run as local system
-c = copy file (ampuninstall.bat) over to client and then execute
-accepteula = not to show the popup to accept the use of PSexec


Essentially what this command does is sets a variable for the machine name, and for every line in the computerlist.txt file, replaces that variable (%G) with the target IP or hostname you want to connect to.
Whenever the script can't connect to a computer it will skip and move on to the next one in the list

 

Sources - combination of these 2 Kace KB's and a lot of sweat and testing
https://support.software.dell.com/k1000-systems-management-appliance/kb/146458
https://support.software.dell.com/kb/127898    

 

Agent reinstallation

Once successfully removed, the Kace agent will reinstall itself from GPO.

Be the first to comment

How to Manage Contacts in Microsoft Outlook

MS Outlook provides contact folder to its users where one can save information regarding a person or an organization. It contains the list of people you want to be in touch with. The contact folders contain multiple fields which can be selected by the user according to his need. The fields in the contact folder include:  Address, Multiple Phone Numbers, A picture, Birthday and much more information related to the Contact.

How to add or create contact in MS Outlook?

Add a Contact:

Step-1 : First you have to open “MS Outlook” then click on “Contact” that can be found at the bottom-left corner, a new window will open.

NOyd0t.png


Step-2 : At the upper–left side of the Outlook toolbar, click on “New Contact”. A new dialog box will open. You can fill in the required detail like your name, Company Name, Job Title, etc. If you want to add the designation before name, then click on Full name button. You can also add contact picture. You can assign a particular category to any contact like green, red, yellow etc. from the Category tag.

Keyboard Shortcut: To add a new contact in MS Outlook, Press “CTRL+ SHIFT+ C”.

erer2n.png

Step-3 : Now, click on “Save & Close” button. If you further want to add more contacts then click on “Save & New” button. Now your previous contact has been saved. You can manage your contact by clicking on “View tab”and then click on “View Settings” Button. From there you can choose your mode like Business Card, Card, List, and Phone. Your new saved Contact will look as shown in the screenshot.

dkGhBW.png

You can also add group contact by New Group Contact option. This is another option to create a distribution list as present in earlier versions of Outlook. Under this, Group email addresses under one name. Good to use when you are about to spearhead a project with many people involved in it. It saves time when sending the same mail to multiple recipients. Every person in the group can be regularly updated about the changes and amendments in the project. There is a limitation to add number of people in a group.
 U7Tnd6.png

Click on “Save and Close” button. In order to send a mail to a particular group, create a new mail and enter the group name in the “to” field. It will automatically include all the members of the group and send mail to all of them.Add a contact based on an existing contact:

When you want to create different contacts that share Common information such as Company Name, Job Title, and Address, you can copy an existing contact and then edit the copy of contact to include other information.

To do this:

  1.  First, you have to make the duplicate copy of contact by right clicking on the existing contact and paste it by using “Ctrl +V” command.
  2. Double click on existing contact, a new window will open and edit the information.

Add a Contact based on the Sender of an email message that you receive:

Outlook contact can easily be created for the person who had sent a mail. In order to do so, you can follow these steps:

  • Open or preview the message of the person whose contact you want to add.
  • Right click on the name of the person.
  • From the drop down list, select the option “Add to Outlook Contacts”. This will open a window in which you can edit all the other fields. Save and close.

Add a contact in public folder

Using Outlook, contacts can even be added to the public folders. For this purpose MS Exchange Server account is required.

  • To create a public contact, Open the Public Folder.
  • If you don’t find Public Folders in the Navigation Pane, then you can find it:

>> Clicking on the folder list in the Navigation Pane, you can find the Public Folder-Username Folder.

  • On the Home Tab, Click on New Items and then click on Contact from the drag down list.
  • Now, fill all the required information that you want to include in Contact.
  • Under the Contact tab, after filling the information, click on “Save and Close” button that can be seen below the menu bar at upper-left corner.

 

How to Import contacts from Excel Sheet


Step-1 : First you have to Open “MS Outlook” and then Click on “File” tab >> “open” >> “Import”.

uLMin2.png

Step-2 : On clicking an Import option, a new dialog box will open, click next as shown below in snapshot. From there you can choose what you want to import.

q8NkYH.png

Step-3 : Here, as I discussed about import contact from Excel sheet, so you have to select MS Excel and click next.

4kwqrc.png

Step-4 : Now,Browse your file you want to Import from your saved location.Select the Do not import duplicate items option and click next”. Select the folder where you want to import the file and click next to proceed.

Kgd2en.png

The fields of the excel sheet should be maintained in the same order as the fields of the contact form in Outlook to allow the correct mapping.

 

 

 

Be the first to comment

Analyze the Working of Exchange Server using ExMon Tool

In this blog, I will explain one of the best tools provided by Microsoft for Exchange server i.e. ExMon. Microsoft introduced Exchange server User Monitor tool that helps administrator to monitor the performance of the Exchange server to know how it is affected by individual Outlook client. The tool enables administrator to collect & view real time data so that he can analyze current client usage pattern, it will help him to plan for future use accordingly.

ExMon also allows administrator to view IP addresses of Exchange users, CPU usage, network traffic, Outlook edition & mode (Cached exchange mode or Classic online mode), sever side processor latency, total latency for network etc.

Even though ExMon enables administrator to view & evaluate individual users’ usage, it doesn’t measure traffic by non-MAPI protocols like SMTP, POP3, IMAP4. ExMon is capable of measuring only MAPI traffic.

Installation of ExMon 

ExMon can be installed on Exchange 2000 Server SP2 and later versions, Exchange Server 2003 SP1 and later versions, Exchange Server 2007 SP1 and later version.

Step 1: Download ExMon, it can be downloaded from Microsoft sites.

Step 2: Go to C:\Program Files\ExMon then execute ExMon.msi. This leads to open below Wizard. Click Next to proceed.

E0E11i.jpeg


Step 3: Next step is to Read & accept the agreement. Click next to proceed.

trvWuG.jpeg

Step 4: Now browse the location where you want to save the installed ExMon or it can be saved in default location.

7AYMKC.jpeg

Step 5: Now click Finish to complete the installation.

zdKLRy.jpeg

Step 6: Next step is to add two registry keys- RpcEtwTracing & UserPerformanceClock to the registry as these keys help to collect the data. ExMon.reg file can be found in installation directory. All you have to do is double click the file or run through a command prompt window.

q2Mrze.jpeg 

Step 7: After completing the above steps, now ExMon can be started by executing the ExMon.exe file from the installation directory (C:\Program Files\ExMon). The below screen will be shown that contains all currently connected IMAP users.

3ApM9x.jpeg 

All the collected data is saved in Event Trace Log (.ETL) files in the installation directory (C:\Program Files\ExMon), as shown in below figure.

mOAnKR.jpeg

Export data with ExMon

ExMon can export collected data to comma-separated text files (.csv) that can be viewed by Microsoft Excel, Microsoft Access, & Microsoft SQL server. You can export files by using either –SU, -SV or SC in command prompt. 

Below command will export the By User data to a .CSV file.

ExMon.exe –SU “C:\Program Files\ExMon\data\ByUser.csv”

ExMon Syntax

exmon.exe

exmon.exe “[Drive:] [Path] InputFileName”

exmon.exe /h

exmon.exe /?

exmon.exe [/ {SU|SV|SC} “[Drive:] [Path] OutputFileName”

“[Drive:] [Path] InputFileName”

Multiple files can be exported at a same time by combining SU, SV, SC. 

st03CD.png

 Unknown StartTrace Error (183) Message

ExMon refresh the real time data every 1minute. If there is a lot of data in Exchange server then ExMon can be crashed while collecting the data with the message ExMon has stopped working. You need to choose between check online or close the program.

When you try to reopen ExMon, you will encounter with an Unknown StartTrace error (183). 

Uy6bk4.jpeg

This error occur because there is an old Event Trace is still running in the background. You need to stop this old trace using a tool called Tracelog.exe for Windows Server 2000/2003. You have to make sure Exmon.exe isn’t running.

V92DFX.jpeg

In Windows Server 2008 you can stop the old Event Trace using a tool called Logman.exe by running the following commands:

HkQ0kR.png

Logman stop "Exchange Event Trace" -ets

WXNRs7.png

After completing the above steps, now your ExMon will work correctly.

Be the first to comment
Showing 1 - 5 of 2786 results