UseCmdletCorrectly
Severity Level: Warning
Description
Whenever we call a command, care should be taken that it is invoked with the correct syntax and parameters.
How
Specify all mandatory parameters when calling commands.
Example
Wrong
Function Set-TodaysDate ()
{
Set-Date
...
}
Correct
Function Set-TodaysDate ()
{
$date = Get-Date
Set-Date -Date $date
...
}
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for