Skip to content

Latest commit

 

History

History
28 lines (24 loc) · 437 Bytes

File metadata and controls

28 lines (24 loc) · 437 Bytes

#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 to Fix Specify all mandatory parameters when calling commands.

##Example ###Wrong:

Function Set-TodaysDate ()
{
	Set-Date
	...
}

###Correct:

Function Set-TodaysDate ()
{
	$date = Get-Date
	Set-Date -Date $t
	...
}