This is an updated version of the Get-ProductKey function that was featured on PowerShell.com's PowerTips. This function expands on the existing code by allowing the querying of multiple remote systems, outputting of objects that include the system, Operating System and version of the OS.
More information about this updated code can be found on my blog:
http://learn-powershell.net/2012/05/04/updating-an-existing-get-productkey-function/
. .\Get-ProductKey.ps1
. .\Get-ProductKey.ps1
Get-ProductKey -Computername Boe-PC,DC1
Get-ProductKey -Computername Boe-PC,DC1
![]()