New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to submit credential objects as arguments #49
Comments
Please provide an example of the code you are executing. |
I tested now again, unable to provoke the error, but still, the code does not run. This also returns nothing; Removing the argument returns True as expected. Looking besides this issue, I must say you have done an impressive job with this module! |
You can pass credential parameter inside this scriptblock.. too much inceptions.. lol rename it to $cred or something |
ffs! Thanks a lot ! ;) param($Cred) Have a nice day :) |
Actually, I tested wrong when I closed the case. |
I worked around this problem by converting the credential objects to an base64 encoded string and back. Invoke-CommandAs -ComputerName $ServerName -AsSystem -ArgumentList $Base64Credential -ScriptBlock {
} |
Cannot serialize the credential. If this command is starting a workflow, the credentials cannot be persisted, because the process in which the workflow is started does not have permission to seri
alize credentials.
-- If the workflow was started in a PSSession to the local computer, add the EnableNetworkAccess parameter to the command that created the session.
-- If the workflow was started in a PSSession to a remote computer, add the Authentication parameter with a value of CredSSP to the command that created the session. Or, connect to a session conf
iguration that has a RunAsUser property value.
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-ScheduledTask
+ PSComputerName :
The text was updated successfully, but these errors were encountered: