Xcopy Command Line With Error Handling

#Move wiqserver.exe and wiqserver.exe.config file to TaskExecutable Folder inside bin. [cmdletBinding()] param ( [parameter(Mandatory =$true)] [ValidateNotNullOrEmpty()] $Source, [parameter(Mandatory =$true)] [ValidateNotNullOrEmpty()] $Dest, [parameter(Mandatory =$true)] [ValidateNotNullOrEmpty()] $FileList ) if (!(Test-Path $Source)) { throw “Source doesn’t exist” } if (!(Test-path $Dest)) { mkdir $Dest } write-output “The file list passed as argument is ” $FileList if(($FileList -eq $null)[…]