In SCOM 2007 R2, if you have the Exchange 2010 Management pack, you may see alerts with the following description: "Logon to the virtual directory 'PowerShell (Default Web Site)' failed with the following error: 'Connecting to remote server failed with the following error message : The WinRM client cannot process the request. The WinRM client tried to use Negotiate authentication mechanism, but the destination computer (<servername>:80) returned an 'access denied' error. "
The error is caused by an entry made in the WinRM client configuration. Specifically, the TrustedHosts is set to "*". You can see this in a command prompt by typing winrm get winrm/config/client. The TrustedHosts will show: TrustedHosts = * To resolve the issue, set TrustedHosts to a null: winrm set winrm/config/client '@{TrustedHosts=""}' Restart the service "WinRm" At this point, the Test-PowerShellConnectivity cmdlet should work fine. You can modify a list of computers at once, using PowerShell:
freddy1041 edited Revision 4. Comment: Missing single quotes to make the command work