Hello Everyone,
I am trying to get install status from a remote computer into a multilline textbox.
It is not working on some computers and It is giving an error on others. At the bottom of this posting you will see the error.
try {
$txtStatus.Text = Invoke-Command -ComputerName $listbox1.SelectedItem -ErrorAction Stop -scriptblock { Get-WUInstallerStatus }
}
catch
{
$txterrbox.Text = $_.ErrorDetails
}
Error detail :
[G4C6QH2] Connecting to remote server G4C6QH2 failed with the following error message : The WinRM client cannot process the request because the server name cannot be resolved. For more information, see the about_Remote_Troubleshooting Help topic.
I confirmed winrm is setup correctly. and I am running the script as admin rights. I also used below line.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Confirm:$False -Force
thanks in advance.