Currently trying to use PowerShell workflow to process some remote server stuff that I am doing in parallel.
I am having no luck trying to get the Invoke-Command
to log onto the server to actually work. It is not throwing an error but there also is no output to the console like there usually is with a Write-Host
statement. Not seeing anything that is helping me looking through older posts.
workflow test {
Param([System.Management.Automation.PSCredential]$cred)
InlineScript {
Write-Host $using:cred
Invoke-Command -Computer "server" -Credential $using:cred -ScriptBlock { Write-Host "hello world" } }
}
}
#Calling the function
test $cred