microsoft / shell-intune-samples

Sample shell scripts for Intune admins.
MIT License
670 stars 222 forks source link

Exit if Company Portal Already Set up #28

Closed m1lkman closed 2 years ago

m1lkman commented 2 years ago

Just a humble suggestion, deploying this in an existing environment may be problematic as is. This will prevent Octory from popping up on deployed systems. May be a better way but this is a simple solution.

theneiljohnson commented 2 years ago

Thanks for this. I am a little confused though. What are you trying to avoid with this exactly?

m1lkman commented 2 years ago

I added this in my environment to prevent Octory from launching on already deployed machines. I'm assuming we only want Octory to launch on new deployments and not open up on machines that have already been deployed to end-users. Thought it might be helpful for others as well. Feel free to ignore this if you don't feel it's benificial.

theneiljohnson commented 2 years ago

I'm confused because this script doesn't launch Octory at all, it just checks if it's running and sends a status update to it. It won't launch it though. Or at least it shouldn't. Which line do you think is launching Octory?

m1lkman commented 2 years ago

Line 184 on your orginal file "sudo -u "$consoleuser" Octory.app/Contents/MacOS/Octory -c onboarding.plist" launches it right? Am I losing my mind?

theneiljohnson commented 2 years ago

Apologies, i think it's me who's losing my mind. For some bizarre reason I thought this was a patch against Company Portal not Octory! Now it makes TOTAL sense! Thanks for bearing with me :-)