| description | Use Cmdlet Correctly |
|---|---|
| ms.custom | PSSA v1.21.0 |
| ms.date | 06/28/2023 |
| ms.topic | reference |
| title | UseCmdletCorrectly |
Severity Level: Warning
Whenever we call a command, care should be taken that it is invoked with the correct syntax and parameters.
Specify all mandatory parameters when calling commands.
Function Set-TodaysDate ()
{
Set-Date
...
}Function Set-TodaysDate ()
{
$date = Get-Date
Set-Date -Date $date
...
}