I need to copy the “ActiveDirectory” PowerShell module folder after prefetching
From: __download\ActiveDirectory
To: C:\Windows\System32\WindowsPowerShell\v1.0\Modules\ActiveDirectory
The destination folder needs to be created during the copy process.
Here is my Actionscript.
======================================================================
prefetch 6fa2c36a06aaf1fe8be3e309a14307dba0a91ded sha1:6fa2c36a06aaf1fe8be3e309a14307dba0a91ded size:389817 http://INB14BFXSRV01V.concentrix.com:52311/Uploads/6fa2c36a06aaf1fe8be3e309a14307dba0a91ded/ActiveDirectory.tmp sha256:b08d073923947f0f39d06b9ddca700cf7b767fe790e291e76dbd29119d5d1c78
extract 6fa2c36a06aaf1fe8be3e309a14307dba0a91ded __Download\ActiveDirectory
waithidden xcopy __download\ActiveDirectory C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ActiveDirectory /E /I /Q /H /Y
- The prefetch and extraction are working as expected.
- The process is failing at the copy stage because of UAC.
- I tried extracting the folder directly to the destination as well as using the native copy command but both fail equally.
How can I run this action with elevated status?
Is there a better way to accomplish this action?
Cheers,
Emil