Related Blog post: Scripting Games 2013 - Advanced Event 2 - An Inventory Intervention

This small function will return information about:

 

Loading and Running the function against the local computer

. .\Get-ComputerInfo.ps1

Get-ComputerInfo

 

Running the function against remote computers with alternative credential

Get-ComputerInfo -ComputerName Server01,Server02 -Credential (Get-Credential)

 

Running the function with Verbose

Get-ComputerInfo -Verbose