Hello I'm new to Powershell. I will be running the script from the machine where I'd like the compressed file to be placed, in the path specified. I want to compress the folder from the UNC path (from the first Read-Host), and place a copy of the resulting .zip file into the specified directory on the computer (from the second Read-Host).
I would like some help adding the necessary components to this bit of Powershell code (assuming what I have here works).
I know that I could just run something like:
Compress-Archive \tommc-pc\c$\users\tommc -DestinationPath c:\windows\temp\tommc_windows_home.zip
...But I'd like to make it more user friendly, so the user would enter the UNC path for the source path and folder that's to be compressed, as well as a prompt for the full Destination path and filename of the .zip file on the machine I'm running the script from.
Might you be so kind as to provide some guidance on how I could accomplish this?