How can we safely store powershell credentials for script usage -
i looking secure means store powershell credentials use in scheduled-task script keep running road blocks. windows server 2008 environment primarily.
the biggest issue have found if throw password out securestring text file , read in later, credential object inherently flawed use scriptable object. provides method exposes clear text information.
$credentialobject.getnetworkcredential().password
this means if has access system , task scheduler, can extract password used in script little trouble.
does know of way around this?
if take credential object , save using export-clixml
, user exported can decrypt it, , on same computer.
so scheduled task has run user.
but task has able decrypt credential use it. there no way around that. can modify task or modify code task runs can credential.
as @ebgreen said, setting credentials on scheduled task only, , not using credential object @ all, work, depends on you're trying do, can't tell without code.
you try use windows credential manager. here's code seems that, i'm not familiar method.
Comments
Post a Comment