Basically from a input provided network path (e.g "\SERVER\SHARE\") i want to copy a specific Excel file to my desktop and run it automatically. Problem is that on my desktop there are other Excel files containing the letters ZZZ. Any ideas? Thank you!
$title = "Copy ZZZ to Desktop"
$zzzpath = read-host Paste ZZZ path here
copy-item "$zzzpath\*ZZZ*.xlsx" "C:\Users\%username%\Desktop\"
Invoke-Item C:\Users\%username%\Desktop\*ZZZ*.xlsx