This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#################################################################################################### | |
# | |
# Copyright (c) 2021, JAMF Software, LLC. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
################# REQUIRED USER DEFINED VARIABLES ############ | |
# set network ID from https://url.jamfcloud.com/devices/enroll.html -> On device enrollment -> Network ID | |
networkId='yournetworkid' | |
# set api key from https://url.jamfcloud.com/configuration/api | |
apiKey='yourapikey' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv | |
import json | |
import requests | |
## CSV FORMAT: | |
# header row - ignored (but should exist) | |
# serial number |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
################# REQUIRED USER DEFINED VARIABLES ############ | |
# set network ID from https://url.jamfcloud.com/devices/enroll.html -> On device enrollment -> Network ID | |
networkId='networkidhere' | |
# set api key from https://url.jamfcloud.com/configuration/api | |
apiKey='apikeyhere' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
# Set all users' passwords in a group to 1234 | |
################# REQUIRED USER DEFINED VARIABLES ############ | |
# set network ID from https://url.jamfcloud.com/devices/enroll.html -> On device enrollment -> Network ID | |
networkId='networkidhere' | |
# set api key from https://url.jamfcloud.com/configuration/api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#################################################################################################### | |
# | |
# Copyright (c) 2021, JAMF Software, LLC. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
#################################################################################################### | |
# | |
# Copyright (c) 2021, JAMF Software, LLC. All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import csv | |
import json | |
import requests | |
networkId='' | |
apiKey='' | |
baseURL='https://url.jamfcloud.com/api' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
################# REQUIRED USER DEFINED VARIABLES ############ | |
# set network ID from https://url.jamfcloud.com/devices/enroll.html -> On device enrollment -> Network ID | |
networkId='networkidhere' | |
# set api key from https://url.jamfcloud.com/configuration/api | |
apiKey='apikeyhere' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Set the url and credentials | |
jssURL="https://yoururl.jamfcloud.com" | |
jssUser="username" | |
jssPass="password" | |
csvPath="/path/to/some.csv" | |
endpoint="someendpoint" | |
IFS=', ' read -r -a allIDs < "$csvPath" |
NewerOlder