NEW Package or task to copy powershell module

AhmedLS

Member
14
0
1
Hi,
i have been trying everything to copy a PS module to (program files/windowspowershell/modules) but with no luck. tried using powershell and batch file and in both cases nothing happens and no errors in the logs. just the copy doesnt happen. is there any restriction that i dont know about or may be something i am missing.
the module is located on a network share with all other apps that i deploy througt our distribution point.

the powershell command i am using is (running them manually within powershell on the client works).
copy-item $executingScriptDirectory\PackageManagement $env:programFiles -force -Recurse
copy-item $executingScriptDirectory\WindowsPowershell $env:programFiles -force -Recurse

the command within the package is
powershell.exe -executionpolicy Bypass -file ".\move-script.ps1"
 
Solution
i ran the above commands on the collection using "Run Script" and it worked. i kind of solved the issue as i deployed the module to my workstations but still looking for a solution using a package.
OP
AhmedLS

AhmedLS

Member
14
0
1
i ran the above commands on the collection using "Run Script" and it worked. i kind of solved the issue as i deployed the module to my workstations but still looking for a solution using a package.
 
Solution

Forum statistics

Threads
4,616
Messages
18,062
Members
9,326
Latest member
Hemald