windows-powershell-docs icon indicating copy to clipboard operation
windows-powershell-docs copied to clipboard

Plaintext `Password` parameter warning for cmdlets along with Set-ScheduledTask

Open iRon7 opened this issue 3 months ago • 0 comments

Prerequisites

  • [x] Existing Issue: Search the existing issues for this repository. If there is an issue that fits your needs do not file a new one. Subscribe, react, or comment on that issue instead.
  • [x] Descriptive Title: Write the title for this issue as a short synopsis. If possible, provide context. For example, "Typo in Get-Foo cmdlet" instead of "Typo."
  • [x] Verify Version: If there is a mismatch between documentation and the behavior on your system, ensure that the version you are using is the same as the documentation. Check this box if they match or the issue you are reporting is not version specific.

Links

  • https://learn.microsoft.com/en-us/powershell/module/scheduledtasks/set-scheduledtask

Summary

Cmdlet documents along with Set-ScheduledTask, should include a warning that it is not safe to handle plaintext passwords in scripts for the same reason that the legacy executable RunAs doesn't support providing a password via the command line and also knowing that even handling passwords with a SecureString in a script is already considered unsecure and a warning for that does exist for a cmdlet document as Send-MailMessage

See also PowerShell issues: #16502 and #26366

Details

No response

Suggested Fix

No response

iRon7 avatar Nov 03 '25 15:11 iRon7