$Results = Invoke-Command -ScriptBlock, LastSearchSuccessDate, LastInstallationSuccessDate, NewUpdateCount, PendingReboot We can now wrap the script with invoke-command to remote execute in multiple systems function Get-WindowsUpdateInformation() Above codes can be combined to get following information about a computer.