pbowden-msft / NukeOffKeychain

Microsoft Office 365/2019/2016 Keychain Removal Tool
88 stars 14 forks source link

Running the script via Jamf #6

Closed ncsutmf closed 5 years ago

ncsutmf commented 5 years ago

As has been mentioned in the MacAdmins microsoft-office slack channel, there are issues with running this script via Jamf. Jamf automatically passes the first three arguments, causing the ShowUsage function to be called and then exiting the script without doing any work.

Fixing this would involve detecting whether the script is running under Jamf, and if so skipping the first three arguments. The second part is easy with the shift command. I believe there was mention of detecting the working directory or something like that but I think a simpler solution would be to just add a valid argument to signal that it needs to skip the first 3. Working on a Pull Request.

pbowden-msft commented 5 years ago

Thanks for the pull request!