![]() ![]() ![]() Written in bash script, so far has been working on everything. Print 'ERROR: Unable to set computer name without local CSV file.' ![]() Print ('ERROR: Unable to set computer name. Print 'SUCCESS: Set computer name to', rename Print 'ERROR: You must provide the URL of a remote CSV file.' # so we split the phrase and return the last element # on success the jamf binary reports 'Set Computer Name to XXX' Proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) '''Renames a computer using the Jamf binary and local CSV at '''Ĭmd = Print 'ERROR: Unable to write file at', CSV_PATH # return path to local csv file to pass alongĮxcept (urllib2.HTTPError, urllib2.URLError): '''Downloads a remote CSV file to CSV_PATH''' The remote CSV could live on a web server you control, OR be a Google Sheet Pass in the URL to your remote CSV file using script parameter 4 Rename computer from remote CSV using Jamf binary More often than not, I have to manually rename the computers and manually add them to AD.Īnyone have a better script for this? Here is mine that I cobbled together from other threads on Jamf Nation. On the Intel Mac's, this didn't seem to be an issue, but with the M1 Mac's, renaming via the script has become unreliable. Upon investigation, the script I was using was only updating the computer name, but not the two hostnames. When trying to use this with the M1 Mac's, it seems that the script isn't working as it should. I have been using a Python script that uses a Google Sheet to locate serial numbers and match them up with names. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |