I'm trying to create script that will connect to remote server (Windows server 2012 with PS4.0), and extract 5 different files from one directory to another on the remote server. The script is using psexec.exe to run commands remotely.
psexec \\$server -u <username> -p <password> powershell start Expand-Archive -path "zipfilepath" -destinationpath "destpath"
The expected result is to extract 5 ZIP files inside directory to another directory on remote server.