How to enable and test PowerShell remoting on a Windows hostIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Resolve Windows Discovery errors that occur when PowerShell remoting is not enabled on target hosts. Windows discovery uses PowerShell remoting to run scripts on target devices. If PowerShell remoting is not enabled, you may see errors such as: "Failed to launch process powershell -ExecutionPolicy ByPass -NonInteractive -WindowStyle Hidden -command" Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Beginning with the Madrid release Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } Enable PowerShell remoting To enable a remote connection on your server: Open PowerShell, and select Run as administrator. In the PowerShell window, type the cmdlet: Enable-PSRemoting -Force.Select Enter. This command starts the WinRM service, sets it to start automatically with your system, and creates a firewall rule that allows incoming connections. The -Force parameter tells PowerShell to perform these actions without prompting you for each step. Add a remote-connected host host to the trusted hosts list Open PowerShell and select Run as administrator.In the PowerShell window, type the following cmdlet:Set-Item wsman:\localhost\client\trustedhosts * The asterisk is a wildcard symbol for all hosts. To restrict which servers can connect, replace the asterisk with a comma-separated list of IP addresses or hostnames. Restart the WinRM service In the PowerShell window, type the following cmdlet:Restart-Service WinRMSelect Enter. Test the connection From the MID Server, open PowerShell and run the following cmdlet: Test-WsMan <Target IP> Select Enter. This command tests whether the WinRM service is running on the remote host. If it completes successfully, information about the remote host WinRM service displays. This indicates that WinRM is enabled and your target host can communicate.If the command fails, an error message displays instead. Run a single remote command on the remote system Use the Invoke-Command cmdlet as follows: Invoke-Command -ComputerName COMPUTER -ScriptBlock { COMMAND } -credential USERNAME. Example The following command displays the contents of the C:\ directory on a remote host with the specified IP address and user name: Invoke-Command -ComputerName <TargetIP> -ScriptBlock { Get-ChildItem C:\ } -credential domain\username Run multiple cmdlets on the remote host Instead of repeating the Invoke-Command cmdlet and the remote IP address, start a remote session: Type the following cmdlet: Enter-PSSession -ComputerName <Target IP> -Credential Domain\USERSelect Enter. Related Links<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: #000000; } span { font-size: 12pt; font-family: Lato; color: #000000; } h2 { font-size: 24pt; font-family: Lato; color: black; } h3 { font-size: 18pt; font-family: Lato; color: black; } h4 { font-size: 14pt; font-family: Lato; color: black; } a { font-size: 12pt; font-family: Lato; color: #00718F; } a:hover { font-size: 12pt; color: #024F69; } a:target { font-size: 12pt; color: #032D42; } a:visited { font-size: 12pt; color: #00718f; } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } PowerShell remoting for Discovery MID Server PowerShell files