I’m trying to write a code to check how many parameters ( with positions ) were entered when executing a powershell script.
param ( sourceserver,
when executing a script , if i miss any parameters it should throw an error saying " a parameter is missing " I know we can put a mandatory params but not sure how to achieve what i’m looking for.
Is it possible to do in powershell ?
Please let me know
thanks in advance