When I execute using Invoke-Command cmdlet to get value from remote machine eventlog for parallel result , I got error, “Connecting to remote server “” failed with the following error message : The client cannot connect to the desitnation specified in the request. Verify that the server on destination is running and is acceptinig requests. Consult the logs and documentation for the WS-Management service running on the destination , most commonly IIS or WinRM. If the destination is the WinRM service, run the following comand on the destination to analyze and configure the WinRM service; “winrm quickconfig”~
So as to communicate it , I run “Enable-PSRemoting -Force” on destination server’s powershell, then when I execute again to get value more fast against using get-eventlog cmdlet, it executes well and get values.
Windows Remote Management (WinRM) is implemented by Microsoft, it use WS-Management protocol, we can connect local computer and remote computer using web service as securely.
Invoke-Command : Runs commands on local and remote computers and returns all output from the commands, including erros. By using a single Invoke-Command command, you can run commands on multiple computers.