SimonInOz Posted August 15, 2019 Posted August 15, 2019 (edited) Hi, Will having a group policy to remove the 'Run' item from menus, thus preventing UNC path access also affect the running of powershell scripts from a UNC location? I cannot get a powershell script to run on a user workstation, it is a computer policy which has security filtering added to tie it to specific computers. Further info: The script is in the 'powershell scripts' tab, not the 'scripts' tab Script Name: %windir%\System32\WindowsPowerShell\v1.0\powershell.exe Script Parameters: -Noninteractive -ExecutionPolicy Bypass -Noprofile -Confirm:$false -file %~dp0test.ps1 (the %~dp0 is supposed to convert this to a UNC path on the scripts directory on SYSVOL.) Anyone have any ideas? I just want to remove some microsoft store apps from a user workstation. Does a computer policy automatically run as the SYSTEM user? Will this affect its ability to remove apps from a user login? Cheers Edited August 15, 2019 by SimonInOz
DJ-1701 Posted August 15, 2019 Posted August 15, 2019 The script name should be the script itself, so just browse to test.ps1 and select it.
SimonInOz Posted August 15, 2019 Author Posted August 15, 2019 Yes, it is already selected and saved as part of the group policy object.
DJ-1701 Posted August 15, 2019 Posted August 15, 2019 Yes, it is already selected and saved as part of the group policy object. But above you said you have selected the powershell.exe as the script, which it shouldn't. You just need the ps1 file selected.
SimonInOz Posted August 15, 2019 Author Posted August 15, 2019 I did it pretty much as stated here: Running PowerShell Startup (Logon) Scripts Using GPO | Windows OS Hub
DJ-1701 Posted August 15, 2019 Posted August 15, 2019 Ok, that one is talking about putting the script in the Scripts section though, rather than Powershell Scripts section. This is how we do our PS1 scripts.
SimonInOz Posted August 15, 2019 Author Posted August 15, 2019 (edited) Man, that was it. Sometimes, it is hard to see the wood for the trees right? You saved me some hours troubleshooting something that was pretty straightforward. Thanks for putting your eyes across this and assisting. Cheers! Edited August 15, 2019 by SimonInOz
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now