Can't vouch for the rest of your script, but you are missing an "s":

$server = (Get-Content c:\temp\vmservers.txt)

Should be 

$servers = (Get-Content c:\temp\vmservers.txt)



Christopher Bodnar 
Enterprise Architect I, Corporate Office of Technology:Enterprise 
Architecture and Engineering Services 
Tel 610-807-6459 
3900 Burgess Place, Bethlehem, PA 18017 
[email protected] 




The Guardian Life Insurance Company of America

www.guardianlife.com 







From:   Todd Lemmiksoo <[email protected]>
To:     [email protected]
Date:   09/24/2013 11:37 AM
Subject:        [NTSysADM] Fwd: Powershell scripting help using wmi to 
uninstall app
Sent by:        [email protected]





---------- Forwarded message ----------
From: Todd Lemmiksoo <[email protected]>
Date: Tue, Sep 24, 2013 at 9:14 AM
Subject: Powershell scripting help using wmi to uninstall app
To: NT System Admin Issues <[email protected]>


I have the following powershell script to uninstall an application that is 
not working. 

$classKey="IdentifyingNumber=`"`{1693DDE2-4577-46E9-AEE2-0EAFE1F2A00E`}`",Name=`"EMC
 
Avamar for Windows`",version=`"6.1.101.87`""

$server = (Get-Content c:\temp\vmservers.txt)

foreach($server in $servers)

{ ([wmi]"\\$server\root\cimv2:Win32_Product.$classKey").uninstall() } 

No error message is displayed in the console.
All help is welcome as to how to troubleshoot this.

-- 
T. Todd Lemmiksoo 



-- 
T. Todd Lemmiksoo 


-----------------------------------------
This message, and any attachments to it, may contain information
that is privileged, confidential, and exempt from disclosure under
applicable law.  If the reader of this message is not the intended
recipient, you are notified that any use, dissemination,
distribution, copying, or communication of this message is strictly
prohibited.  If you have received this message in error, please
notify the sender immediately by return e-mail and delete the
message and any attachments.  Thank you.

<<image/jpeg>>

Reply via email to