Management

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 785 other subscribers

Social

  • LinkedIn
  • RSS Feed for Posts
  • Twitter
  • StumbleUpon

HOW TO: Create a software list in powershell on server 2008 (R2) + 2012 (R2)

This week I had to compare software on multiple Remote Desktop Servers.

To do this quicly I wrote this little Powershell script, to create a CSV file of the software, in order to compare the lists.

 

You can create a list by means of:

Get-WmiObject -class win32_product

 

Creating a csv file for this:

 

# Create report directory

New-Item “C:\Scripts” -type directory -Force | Out-Null

Write-Verbose “Scripts directory is created, or already exists.”

 

#create the csv file

$FileName=$env:computername

Write-Verbose $Filename

Get-WmiObject -class win32_product | select name, version, vendor | Export-Csv “c:\scripts\software-$FileName.csv”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.