Hello,
Getting started with PS scripting and putting together few scripts that helps in my day to day work. I am receiving the below error when I try and pass few parameters in the below script. The details are as below. What am I doing wrong ?
Script I am running is below.
Param (
[Parameter(Mandatory=$True)]
[string]$Name,
[Parameter(Mandatory=$True)]
[string]$Description)
New-CMAntimalwarePolicy -Name -Policy ExclusionSettings -Description -Verbose
It asks me to enter Name and Description just fine but when I hit enter again I get the below error.
New-CMAntimalwarePolicy : Missing an argument for parameter ‘Name’. Specify a parameter of type ‘System.String’ and
try again.
At line:9 char:25
- New-CMAntimalwarePolicy -Name -Policy ExclusionSettings -Description …
-
~~~~~
- CategoryInfo : InvalidArgument: ( [New-CMAntimalwarePolicy], ParameterBindingException
- FullyQualifiedErrorId : MissingArgument,Microsoft.ConfigurationManagement.Cmdlets.EP.Commands.NewAntimalwarePoli
cyCommand