Automating Serial Number Removal from Enterprise Management Site via Script Editor

Hello all,


I am exploring options to automate a process in our Mac deployment. I have no scripting experience and would rather come up with a solution myself instead of going to our guys who actually do this stuff. When Macs are returned to me, I am required to remove them from our enterprise management site, doing so with the Serial Number. I need a process to sign into our site whether it's through Safari or Chrome > Navigate through several user inputs > Generate/Paste the Serial Number > Select a few more user inputs


I am able to generate an output of the SN by using the following below. Where can I put this at? The beginning?


set strIOPlatformSerialNumber to (do shell script "ioreg -l | grep IOPlatformSerialNumber | cut -d '\"' -f4")


This is what I have so far. Everything works up until my next step, which is prompting me for user input.


tell application "Google Chrome"

activate

open location "our site"

end tell


tell application "System Events"

delay 1

keystroke "email"

delay 1

keystroke return

delay 1

keystroke "password"

keystroke return

end tell


Feel free to ask plenty of questions.

Posted on Nov 10, 2020 7:57 AM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automating Serial Number Removal from Enterprise Management Site via Script Editor

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.