I have the parameters as followed
[CmdletBinding()]
param
(
[
Parameter(Mandatory=$True,Position=1)]
[
String]$src,
[
Parameter(Mandatory=$True,Position=2)]
[
String]$destsite,
[
Parameter(Mandatory=$True,Position=3)]
[
String]$destlib,
[
Parameter(Mandatory=$True,Position=4)]
[
String]$exclusions,
[
Parameter(Mandatory=$True,Position=5)]
[
String]$permissionmap,
[
Parameter(Mandatory=$False,Position=6)]
[
String]$batch,
[
Parameter(Mandatory=$True,Position=7)]
[
Int]$quota,
[
Parameter(Mandatory=$False,Position=8)]
[
Switch]$dryrun,
[
Parameter(Mandatory=$False,Position=9)]
[
Switch]$copy
)
What I am wanting to do is, if batch is there src, destsite and destlib are no longer necessary
also if any of the parameters are spelt wrong like -cpy then I can put my own error message in