Prerequisites
Steps to reproduce
Along with the common security rules and defined by e.g. PSScriptAnalyzer rule PSAvoidUsingPlainTextForPassword:
Parameter '$Password' should use SecureString,
otherwise this will expose sensitive information.
See ConvertTo-SecureString for more information.
Related: StackOverflow: Hide not the output but the actual command containing sensitive info in devops logs
Expected behavior
Have a [PSCredential] parameter instead
Actual behavior
Set-ScheduledTask accepts a plain text password ([[-Password] <String>])
Environment data
Name Value
---- -----
PSVersion 7.2.0
PSEdition Core
GitCommitId 7.2.0
OS Microsoft Windows 10.0.22000
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Prerequisites
Steps to reproduce
Along with the common security rules and defined by e.g.
PSScriptAnalyzerrule PSAvoidUsingPlainTextForPassword:Related: StackOverflow: Hide not the output but the actual command containing sensitive info in devops logs
Expected behavior
Have a
[PSCredential]parameter insteadActual behavior
Set-ScheduledTaskaccepts a plain text password ([[-Password] <String>])Environment data
Visuals
No response