help creating a power shell script to search for specific application on servers in a domain


hi,

i looking create power shell script search servers on our domain in ip address range(or ou if ip range complex) application "ctera" want find out application can uninstall not using backup solution anymore.

i came across article in searches:  

http://blogs.technet.com/b/heyscriptingguy/archive/2013/11/15/use-powershell-to-find-installed-software.aspx

that talks using following format find apps checking registry.

i created script run on server , find 1 computer using name.  now problem had go test server in question , use enable-psremoting.  which in our case not practical not sure invoke command way this, unless can figure out way make servers in sub net or ou allow invoke command.

basically looking script allow me search servers in our domain see if application installed can manually go servers , uninstall it.

any ideas on best way approach via powershell?

=================

ps c:\windows\system32> invoke-command -cn server12-server -scriptblock {get-itemproperty hklm:\software\wow6432node\ctera\*
 |select displayname, publisher, installdate}


displayname        :
publisher          :
installdate        :
pscomputername     : server12-server
runspaceid         : xxxxxxxxxxxxxxx-xxxxxxxxxxx
psshowcomputername : true



ps c:\windows\system32>

======================================

get-wmiobject win32_product -filter "name = 'ctera agent'"

or

get-wmiobject -query "select * win32_product name = 'ctera agent'"

or using operator

get-wmiobject -class win32_product -filter "name 'ctera%'"
aware take while, has go through every single product has been installed before completes.


if find post has answered question, please mark answer. if find post helpful in anyway, please click vote helpful.

don't retire technet




Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

2008 Windows Deployment Server Properties Error

Can no longer user MS Update - Files required to use Microsoft Update are no longer registered

How do a find data in one file, search for it in another file and if not found, write a custom message to another file