Jump to content

Recommended Posts

Posted (edited)

This is really frustrating, I'm running the OneDriveMapper script by leibenstrum, as below.

 

I've got the logon script set to run as part of a .bat file with the command:

  @echo off
powershell.exe -executionpolicy bypass -windowstyle hidden -noninteractive -nologo -file "OneDriveMapper_v2.53.ps1"

 

This works perfectly for general teachers logging into desktops. Science teachers who log into laptops however get the powershell window popup and i can't work out why >_< they do pickup an additional computer policy which replaces their folder redirection and a couple of other settings, but i can't see anything that would be causing the script to show.

 

Any suggestions? I'm guessing it's going to just be a policy, but i can't for the life of me see which one it could be. Things such as "run legacy logon scripts hidden" are set.

Edited by mrbios
Posted

Could your Science teachers be running the script with elevated permissions?

If the script detects that it's elevated it schedules a second copy of itself with non-elevated permissions but doesn't hide the console window by default.

 

You can hide the console with the following setting:

 

$showElevatedConsole   = $False

  • Thanks 1
Posted
Could your Science teachers be running the script with elevated permissions?

If the script detects that it's elevated it schedules a second copy of itself with non-elevated permissions but doesn't hide the console window by default.

 

You can hide the console with the following setting:

 

$showElevatedConsole   = $False

 

Oh man im such a simpleton! I didn't notice the showconsoleoutput and showelevatedconsole configuration lines! both were set to true >_<

 

Thank you!

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...