

Then, to uninstall our target application, for each instance, we want to execute: (note the escaping to make the quote characters around the values) The $classkey variable shown is the string needed to “fully qualify” the application to delete – let’s just look at the first app in the list: That’s all the basic information we need to delete an app, let’s put it together. OK – now let’s just pick the apps we want to remove: Next, let’s get the info we need to delete an app – the App name, version and “IdentifyingNumber” (the application’s GUID): If you don’t have a software inventory solution, Powershell can get the job done with just a bit of scripting (note that this is does not show the entire list of members in $apps - it's a pretty long list) Let’s start by listing the apps on a workstation. Say, with nothing but Powershell? In years past, I would have used WMIC and cmd files, but Powershell is much faster and much more flexible. How can you do this for free, without buying a full software inventory and management system. But what if the final finding isn’t “Lets update Java” but rather, “Why do we need JRE installed at all? Let’s delete it across the domain” The following VBScript sample deletes software on a computer strComputer = ".In my last story, we went over winnowing through a Nessus scan to determine which apps you might want to patch. However, if Microsoft Excel is available to the user through Group Policy, the user will be able to reinstall the application. For example, if Microsoft Excel has been installed on a computer, you can use the Uninstall method to remove it. Instead, the software is simply removed from the computer.Īlthough the Uninstall method can remove software from a computer, it does not override Group Policy. This is because no multihop security operations are involved. The Uninstall method can be used either on the local computer or on a remote computer, and without delegation. The Win32_Product Uninstall method can be used to remove software from a computer. The software is installed on the wrong computer.The software is not licensed for use in the organization.The software is being replaced by a competing software package.The functionality supplied by the software is no longer needed.

Software installation is rarely permanent instead, software is typically removed at some point in time, and for any number of reasons: For more information about using this method see Calling a Method. This topic uses Managed Object Format (MOF) syntax. For more information about support or requirements for installation on a specific operating system, see Operating System Availability of WMI Components.
