I recently had a request from a user where they wanted everyone in their department to have a particular folder location mapped in their Quick Access location.
I came across a Powershell script which is able to do this
I did then have further problems with SCCM not being able to deploy this script as it kept coming up with 0x01 error.
To get around this I then had to create a package which was a batch file calling the powershell script with the following command:
powershell.exe -executionpolicy remotesigned -File "File Location and name.ps1"
exit /b %errorlevel%
Note when doing this I had to run with the user's rights rather than the local administrators, and also set it to run only when a user is logged on.
I came across a Powershell script which is able to do this
$o = new-object -com shell.application
$o.Namespace('Folder location here').Self.InvokeVerb("pintohome")
I did then have further problems with SCCM not being able to deploy this script as it kept coming up with 0x01 error.
To get around this I then had to create a package which was a batch file calling the powershell script with the following command:
powershell.exe -executionpolicy remotesigned -File "File Location and name.ps1"
exit /b %errorlevel%
Note when doing this I had to run with the user's rights rather than the local administrators, and also set it to run only when a user is logged on.
Comments
Post a Comment