<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PowerShell Daily &#187; WMI</title>
	<atom:link href="http://proproit.com/category/wmi/feed/" rel="self" type="application/rss+xml" />
	<link>http://proproit.com</link>
	<description>Using PowerShell in Real Life Daily</description>
	<lastBuildDate>Thu, 11 Oct 2012 08:19:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Microsoft Office Project Professional 2010 Remote Uninstall</title>
		<link>http://proproit.com/wmi/microsoft-office-project-professional-2010-remote-uninstall/</link>
		<comments>http://proproit.com/wmi/microsoft-office-project-professional-2010-remote-uninstall/#comments</comments>
		<pubDate>Fri, 25 May 2012 10:45:52 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[Install]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[microsoft office]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[project professional]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[remote computer]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[wmi]]></category>
		<category><![CDATA[WmiObject]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=286</guid>
		<description><![CDATA[Here is an example how to uninstall Microsoft Office Project Professional 2010 remotely.]]></description>
				<content:encoded><![CDATA[<p>Here is an example how to uninstall Microsoft Office Project Professional 2010 remotely.<br />
This script include these steps:<br />
1. Getting the list of computers and performs actions following actions on them<br />
2. Check if it is pinging, if there is installed Microsoft Office Project Professional 2010 using wmi<br />
3. Creates a job with invoke-command for particular computer with these steps:<br />
    a. Creates file config.xml in C:\Windows\Temp (for silent uninstall command)<br />
    b. Checks remote computer architecture (x32 or x64)<br />
    c. Runs this command which performs silent uninstall: &#8220;C:\Program Files\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe&#8221; /UNINSTALL PRJPRO /CONFIG &#8220;C:\Windows\Temp\config.xml&#8221;<br />
    d. Register Event: if changes the job state than performs checking if this computer still has Microsoft Office Project Professional 2010 in installed programs<br />
    c. Depending on result in checking existence of Microsoft Office Project Professional 2010 after uninstall command it writes to the host if job passed or failed.</p>
<pre class="brush: ps">
"PC01" | ForEach-Object {
    if (Test-Connection $_ -Quiet -Count 1)
        {
        $pcname=$_
        if (Get-WmiObject win32_product -ComputerName $pcname -Filter "Caption='Microsoft Office Project Professional 2010'")
            {
            $pcname
            $job = Invoke-Command -ComputerName $pcname -AsJob -ScriptBlock `
                {
                New-Item -Path C:\Windows\Temp -Name config.xml -ItemType "file" -Value `
                        '
                        <Configuration Product="PrjPro">
	                        <Display Level="None" CompletionNotice="No" SuppressModal="Yes" AcceptEula="Yes" /> 
	                        <Logging Type="standard" Path="%temp%" Template="Microsoft Office Project Professional Setup(*).txt" />
	                        <OptionState Id="OptionID" State="absent" Children="force" />
	                        <Setting Id="SETUP_REBOOT" Value="Never" />
                        </Configuration>
                        '
                if([IntPtr]::Size -eq 4)
                    {
                    Start-Process -PassThru -Verb RunAs -FilePath "C:\Program Files\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe" -ArgumentList '/UNINSTALL PRJPRO /CONFIG "C:\Windows\Temp\config.xml"' -Wait
                    }
                Else
                    {                        
                    Start-Process -PassThru -Verb RunAs -FilePath "C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\Office Setup Controller\setup.exe" -ArgumentList '/UNINSTALL PRJPRO /CONFIG "C:\Windows\Temp\config.xml"' -Wait
                    }
                }
            Register-ObjectEvent $job StateChanged -Action `
                {
                if (Get-WmiObject win32_product -Filter "Caption='Microsoft Office Project Professional 2010'")
                    {
                    Write-Host "Job #$($sender.Id) ($($sender.Location)) failed" -ForegroundColor Red
                    }
                else
                    {
                    Write-Host "Job #$($sender.Id) ($($sender.Location)) completed" -ForegroundColor Green
                    }
                }
            }
        }
    }
</pre>
<p>P.S. Please take into consideration that PowerShell Remoting should be enabled on all computers where do you want to perform uninistall:</p>
<ul>
<li>$Host.Version 3.0 Beta</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/wmi/microsoft-office-project-professional-2010-remote-uninstall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Currently Logged On User</title>
		<link>http://proproit.com/wmi/get-currently-logged-on-user/</link>
		<comments>http://proproit.com/wmi/get-currently-logged-on-user/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 13:55:40 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[ADDS]]></category>
		<category><![CDATA[Remoting]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[ActiveRoles]]></category>
		<category><![CDATA[address]]></category>
		<category><![CDATA[ADManagement]]></category>
		<category><![CDATA[computerName]]></category>
		<category><![CDATA[Computersystem]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[Get]]></category>
		<category><![CDATA[Logged]]></category>
		<category><![CDATA[OSName]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[QADComputer]]></category>
		<category><![CDATA[QADUser]]></category>
		<category><![CDATA[Quest]]></category>
		<category><![CDATA[Quiet]]></category>
		<category><![CDATA[Remote]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[WmiObject]]></category>
		<category><![CDATA[workstation]]></category>
		<category><![CDATA[workstation name]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=259</guid>
		<description><![CDATA[I simply put the workstation name and run the script. The result is in output window in comma separated view: workstation name, NT user account name, and user's e-mail address taken from AD]]></description>
				<content:encoded><![CDATA[<p>This is the most often used script. I am using it whenever someone wants to know who is logged on to that workstation or I need to do something on that workstation remotely.</p>
<p>I simply put the workstation name and run the script. The result is in output window in comma separated view: workstation name, NT user account name, and user&#8217;s e-mail address taken from AD.</p>
<pre class="brush: ps">Get-QADComputer -Name workstation -osname *XP* | sort name | foreach `
    {
    if (Test-Connection $_.name -Quiet)
        {
        $name = $_.name
        $name + ", " + `
        ((Get-WmiObject Win32_ComputerSystem -ComputerName $name -EA Stop).UserName) + ", " + `
        (Get-QADUser (((Get-WmiObject Win32_ComputerSystem -ComputerName $name -EA Stop).UserName)) -EA Stop | foreach {$_.email})
        trap {$name + ", " + "{0}" -f $_.Exception.Message; continue}
        }
    else
        {
        $_.name + ", don't respond"
        }
    }</pre>
<p>P.S. I am using:</p>
<ul>
<li>$Host.Version 3.0 Preview</li>
<li>Quest.ActiveRoles.ADManagement 1.4.0.2139</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/wmi/get-currently-logged-on-user/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Remove Annoying XPS and TIFF Microsoft Office Printers</title>
		<link>http://proproit.com/wmi/remove-annoying-xps-and-tiff-microsoft-office-printers/</link>
		<comments>http://proproit.com/wmi/remove-annoying-xps-and-tiff-microsoft-office-printers/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 09:06:09 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[WMI]]></category>
		<category><![CDATA[ActiveRoles]]></category>
		<category><![CDATA[Annoying]]></category>
		<category><![CDATA[document image]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[microsoft office document]]></category>
		<category><![CDATA[microsoft office document image writer]]></category>
		<category><![CDATA[microsoft xps document writer]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[office printers]]></category>
		<category><![CDATA[Quiet]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[test connection]]></category>
		<category><![CDATA[tiff]]></category>
		<category><![CDATA[wmi]]></category>
		<category><![CDATA[WmiObject]]></category>
		<category><![CDATA[workstation]]></category>
		<category><![CDATA[workstations]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=250</guid>
		<description><![CDATA[That is why I decided to delete Microsoft XPS Document Writer and Microsoft Office Document Image Writer from all workstations using this script]]></description>
				<content:encoded><![CDATA[<p>When you are installing whatever version of Microsoft Office it is installing without any question two types of printers which are useless in some configurations and even more they are malicious when some of it is selected as default.<br />
That is why I decided to delete Microsoft XPS Document Writer and Microsoft Office Document Image Writer from all workstations using this script.</p>
<pre class="brush: ps">
Get-QADComputer -OSName *XP | foreach `
    {
    if (Test-Connection $_.name -Quiet)
        {
        $name=$_.name;
        (Get-WmiObject win32_printer -ComputerName $name  | where {$_.name -eq "Microsoft XPS Document Writer"}).delete()
        (Get-WmiObject win32_printer -ComputerName $name  | where {$_.name -eq "Microsoft Office Document Image Writer"}).delete()
        }
    }
</pre>
<p>P.S. I am using:</p>
<ul>
<li>$Host.Version 3.0 Preview</li>
<li>Quest.ActiveRoles.ADManagement 1.4.0.2139</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/wmi/remove-annoying-xps-and-tiff-microsoft-office-printers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting OS Language</title>
		<link>http://proproit.com/wmi/getting-os-language/</link>
		<comments>http://proproit.com/wmi/getting-os-language/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 15:09:52 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[ADDS]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[admin user]]></category>
		<category><![CDATA[Admins]]></category>
		<category><![CDATA[admins group]]></category>
		<category><![CDATA[computerName]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[English]]></category>
		<category><![CDATA[exception message]]></category>
		<category><![CDATA[ForEach-object]]></category>
		<category><![CDATA[Get]]></category>
		<category><![CDATA[Language]]></category>
		<category><![CDATA[languages]]></category>
		<category><![CDATA[Message]]></category>
		<category><![CDATA[OperatingSystem]]></category>
		<category><![CDATA[oslang]]></category>
		<category><![CDATA[oslanguage]]></category>
		<category><![CDATA[QADComputer]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[test connection]]></category>
		<category><![CDATA[test path]]></category>
		<category><![CDATA[wmi]]></category>
		<category><![CDATA[WmiObject]]></category>
		<category><![CDATA[workstation]]></category>
		<category><![CDATA[workstation name]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=132</guid>
		<description><![CDATA[It's helpful to know the language of OS you are using or writing scripts for.]]></description>
				<content:encoded><![CDATA[<p>When you use some language oriented objects of workstation like local admin user or local admins group it&#8217;s names and other properties depends on the language of OS.<br />
That&#8217;s why it&#8217;s helpful to know the language of OS you are using or writing scripts for.<br />
For this purposes here it is a script which generates a csv file with workstation names and OS languages.</p>
<pre class="brush: ps">
$path = "c:\oslang.csv"
#deleting old file if exist one
if (Test-Path "$path")
    {
    Remove-Item "$path"
    }
Get-QADComputer | ForEach-Object `
    {
    if (Test-Connection $_.name -count 1 -quiet)
        {
        $pcname=$_.name
#making for current workstation a variable with oscode
        $oscode = Get-WmiObject Win32_OperatingSystem -ComputerName $pcname -ErrorAction continue | foreach {$_.oslanguage}
#making a variable to switch to needed text depending on oscode (decimal language code)
#it can be wided by adding your language code for example from here: http://www.science.co.il/language/Locale-Codes.asp
        $switch = switch ($oscode) `
            {
            1033 {"English"};
            1049 {"Russian"};
            default {"Unknown"}
            }
#core operation for getting oslanguage using above variables
        Get-WmiObject Win32_OperatingSystem -ComputerName $pcname -ErrorAction stop | foreach {$_.csname + ", " + $switch >> $path}
#trapping error code for last operation. on operation before this last one pointed an option  -erroraction continue which means that it's not capturing with trap cmdlet and exclude double writing workstation names with errors to csv file
        trap {$pcname + ", " + "{0}" -f $_.Exception.Message >> $path; continue}
        }
    }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/wmi/getting-os-language/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Which User is Logged in to Workstation</title>
		<link>http://proproit.com/wmi/which-user-is-logged-in-to-workstation/</link>
		<comments>http://proproit.com/wmi/which-user-is-logged-in-to-workstation/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 12:22:44 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[ADDS]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[computerName]]></category>
		<category><![CDATA[Computersystem]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[error message]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[Exception]]></category>
		<category><![CDATA[exception message]]></category>
		<category><![CDATA[file csv]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[Logged]]></category>
		<category><![CDATA[OSName]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[output string]]></category>
		<category><![CDATA[Professional]]></category>
		<category><![CDATA[QADComputer]]></category>
		<category><![CDATA[QADUser]]></category>
		<category><![CDATA[Quiet]]></category>
		<category><![CDATA[test connection]]></category>
		<category><![CDATA[trap name]]></category>
		<category><![CDATA[username]]></category>
		<category><![CDATA[windows xp]]></category>
		<category><![CDATA[wmi]]></category>
		<category><![CDATA[WmiObject]]></category>
		<category><![CDATA[workstation name]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=125</guid>
		<description><![CDATA[It is useful to know which user is logged in to the specified workstation]]></description>
				<content:encoded><![CDATA[<p>It is useful to know which user is logged in to the specified workstation.</p>
<p>For this I wrote this script.</p>
<pre class="brush: ps">
#getting the needed workstations. in this example all XPs in our domain
Get-QADComputer -OSName "Windows XP Professional" | foreach `
    {
#each of them is testing for ping. if it's pinging the script continue
    if (Test-Connection $_.name -Quiet)
        {
        $name = $_.name
#generates a string in which is workstation name; username; user's email        
        $name + ";" + `
        ((Get-WmiObject Win32_ComputerSystem -ComputerName $name -EA Stop).UserName) + ";" + `
        (Get-QADUser (((Get-WmiObject Win32_ComputerSystem -ComputerName $name -EA Stop).UserName)) -EA Stop | foreach {$_.email})
#this string is for trapping errors generating by last string and output workstation's name; error message
        trap {$name + ";" + "{0}" -f $_.Exception.Message; continue}
        }
    else
        {
#if the workstation do not pinging there are an output string with name;don't respond
        $_.name + ";don't respond"
        }
    }
</pre>
<p>It&#8217;s is possible to add >> c:\file.csv and import this list to excel.</p>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/wmi/which-user-is-logged-in-to-workstation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get Servers&#8217; Models with WMI</title>
		<link>http://proproit.com/wmi/get-servers-models-with-wmi/</link>
		<comments>http://proproit.com/wmi/get-servers-models-with-wmi/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 06:45:19 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[ADDS]]></category>
		<category><![CDATA[WMI]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[boss]]></category>
		<category><![CDATA[brush]]></category>
		<category><![CDATA[computerName]]></category>
		<category><![CDATA[Computersystem]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[ErrorAction]]></category>
		<category><![CDATA[foreach]]></category>
		<category><![CDATA[Get]]></category>
		<category><![CDATA[HDD]]></category>
		<category><![CDATA[HideTableHeaders]]></category>
		<category><![CDATA[information]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[match]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[necessary servers]]></category>
		<category><![CDATA[OSName]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[QADComputer]]></category>
		<category><![CDATA[Quiet]]></category>
		<category><![CDATA[RAM]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[silentlycontinue]]></category>
		<category><![CDATA[Test]]></category>
		<category><![CDATA[test connection]]></category>
		<category><![CDATA[variable name]]></category>
		<category><![CDATA[win2k3]]></category>
		<category><![CDATA[wmi]]></category>
		<category><![CDATA[WmiObject]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=114</guid>
		<description><![CDATA[If your boss said to collect information about server's models for upgrading it's RAM or HDD you can use this script with help of WMI.]]></description>
				<content:encoded><![CDATA[<p>If your boss said to collect information about servers&#8217; models for upgrading it&#8217;s RAM or HDD you can use this script with help of WMI.</p>
<pre class="brush: ps">
#getting all computers with win2k8, you can use *2003* for win2k3
Get-QADComputer -osName *2008* | foreach `
    {
#if they are pinging     
    if (Test-Connection $_.name -Quiet)
        {
#if there are no problems with wmi access and server's model matching ml150
        if((Get-WmiObject -computername $_.name Win32_Computersystem -ErrorAction silentlycontinue).model -match "ML150")
            {
#assigning to variable name and model of that server
            $wmi = Get-WmiObject -computername $_.name Win32_Computersystem -ErrorAction silentlycontinue | ft name, model -HideTableHeaders
#checking wmi for errors if everithing is ok then output $wmi
            if (-not $wmi)
                {
                write-warning $_.name + ", WMI Error"
                }
            else
                {
                $wmi
                }
            }
        }
#and if server is not pinging, write it on the screen
    else
        {
        $_.name + ", don't respond"
        }
    }
</pre>
<p>After that you will receive the list without the headers of servers&#8217; names and models with are math ml150 in the model. You can use whatever you like in this statement or just delete this if statement for output all necessary servers and it&#8217; models.</p>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/wmi/get-servers-models-with-wmi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and Destroy</title>
		<link>http://proproit.com/wmi/search-and-destroy/</link>
		<comments>http://proproit.com/wmi/search-and-destroy/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 14:57:06 +0000</pubDate>
		<dc:creator>Mihail Stacanov</dc:creator>
				<category><![CDATA[WMI]]></category>
		<category><![CDATA[management framework]]></category>
		<category><![CDATA[silent mode]]></category>
		<category><![CDATA[sp3]]></category>
		<category><![CDATA[spuninst]]></category>
		<category><![CDATA[test connection]]></category>
		<category><![CDATA[windows updates]]></category>
		<category><![CDATA[windows xp]]></category>

		<guid isPermaLink="false">http://proproit.com/?p=12</guid>
		<description><![CDATA[This script was needed for deleting update kb925877 for installing SP3 for Windows XP and deploying PowerShell and WinRM (Management  Framework) in our environment.]]></description>
				<content:encoded><![CDATA[<div>
<p>Hi friends and co-powershellers. I’ve  decided to start my own blog and post any of my thoughts and  investigations in PowerShell.</p>
<p>I want to share with you this script for finding and deleting one of  installed windows updates.</p>
<pre class="brush: ps">Get-QADComputer -OSName *Professional | ForEach-Object {
if (Test-Connection $_.name -count 1 -quiet)
{
$pcname=$_.name
if (Get-WmiObject Win32_QuickFixEngineering -computername $pcname  -Filter “HotFixID=’KB925877′”)
{
$pcname
copy-item C:\WINDOWS\`$NtUninstallKB925877`$\spuninst -Destination  \\$pcname\C`$\WINDOWS\`$NtUninstallKB925877`$\spuninst -Recurse
PSCX\Start-Process  C:\WINDOWS\`$NtUninstallKB925877`$\spuninst\spuninst.exe -ComputerName  $pcname -Arguments “/quiet /passive /f /norestart”
}
}
}
</pre>
<p>This script was needed for deleting update kb925877 for installing SP3 for Windows XP and deploying PowerShell and WinRM (Management  Framework) in our environment.</p>
<p>First line takes all workstations in our environment (with name  containing OSes with names *Professional) and for each of them makes a  script block</p>
<pre class="brush: ps">Get-QADComputer -OSName *Professional | ForEach-Object {</pre>
<p>Next it’s checking if computer is turned on</p>
<pre class="brush: ps">if (Test-Connection  $_.name -count 1 -quiet)</pre>
<p>and if there are installed this update</p>
<pre class="brush: ps">if  (Get-WmiObject Win32_QuickFixEngineering -computername $pcname -Filter  "HotFixID='KB925877'")</pre>
<p>After passing these statements runs two commands copying files for  uninstalling update and runs them on that computer in silent mode.</p>
<p>P.S. I am using:</p>
<ul>
<li>$Host.Version 2.0</li>
<li>Quest.ActiveRoles.ADManagement  1.3.0.1787</li>
<li>PSCX 1.2.0.0</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://proproit.com/wmi/search-and-destroy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
