Need exit code from running remote PowerShell script it bellow is my script
Param( [Parameter(Position=1)] [string]$IPaddress, [Parameter(Position=2)] [string]$Clustername)$creds=import-clixml -Path /tmp/tent.xmlInvoke-Command -ComputerName $IPaddress -Authentication Negotiate -Credential $creds -FilePath \tmp\check_cluster_node.ps1 -ArgumentList $Clustername
What is the output when you run the commands interactively? does \tmp\check_cluster_node.ps1 produce any output? That script should NOT be using Write-Host as that does not get written to the output stream.
Powered by IDERA