A powershell module that provides an easy method for interacting with Jamf Pro's APIs inside scripts or the Powershell command line.
Table of Contents
Jamf Pro's APIs have tools built around them, and there are a lot of other API frameworks and tools available for different languages. However, my initial search turned out very little around PowerShell and Jamf Pro's APIs.
Out of those, none were as useful as the ruby-jss
Ruby Gem. From that, this project was born.
The main purpose of this project is provide an abstract layer to the Jamf Pro's APIs to easily offer function based commands for Windows and PowerShell Core users.
This is a powershell module, which requires Powershell Core to be installed at the minimum.
Links to other repos coming soon...
- Copy the
JamfPro
folder into your~/.local/share/powershell/Modules/
folder- Windows users may have a different folder.
- Open Powershell
- Run the command
Get-Module 'JamfPro'
- All functions are loaded, you can verify this by running
Get-Command -Module 'JamfPro'
Make sure you review the Usage section of this README for example uses of this module.
Get-Module 'JamfPro'
$Server = "https://acme.com"
$Creds = Get-Credential "apiuser"
$Token = New-Token -Server $Server -Credentials $Creds
# This is assuming the $token variable is set with a valid token.
$Server = "https://achmo.com"
# All devices
$Computers = Get-Computer -Server $Server -Token $token.token -All
# Specific device
$Computer = Get-Computer -Server $Server -Token $token.token -id 1
- Authentication
- Get Token
- Refresh Token
- Invalidate Token
- Convert JSON to Jamf's XML
- Add Criteria (Smart Group/Search)
- Categories
- Get Categories
- Get single Category
- Update Category
- Delete Category
- Create Category
- Sites
- Get Sites
- Get single Site
- Update Site
- Delete Site
- Create Site
- Buildings
- Get Buildings
- Get single Building
- Update Building
- Delete Building
- Create Building
- Departments
- Get Departments
- Get single Department
- Update Department
- Delete Department
- Create Department
- Groups
- Computer
- Get Groups
- Get single Group
- Update Group
- Delete Group
- Create Group
- User
- Get Groups
- Get single Group
- Update Group
- Delete Group
- Create Group
- Mobile
- Get Groups
- Get single Group
- Update Group
- Delete Group
- Create Group
- Computer
- Searches
- Computer
- Get Searches
- Get single Search
- Update Search
- Delete Search
- Create Search
- Mobile
- Get Searches
- Get single Search
- Update Search
- Delete Search
- Create Search
- Computer
- Devices
- Computers
- Get Computers
- Get single computer
- Update computer
- Delete computer
- Create computer
- Mobile Devices
- Get mobile devices
- Get single mobile device
- Update mobile device
- Delete mobile device
- Create mobile device
- Computers
- Configuration Profiles
- Get configuration profiles
- Get single configuration profile
- Update configuration profile
- Delete configuration profile
- Create configuration profile
- Policies
- Get Policies
- Get single Policy
- Update Policy
- Delete Policy
- Create Policy
- Scripts
- Get scripts
- Get single script
- Update script
- Delete script
- Create script
- Extension Attributes
- Get Extenstion Attributes
- Get single Extenstion Attribute
- Update Extenstion Attribute
- Delete Extenstion Attribute
- Create Extenstion Attribute
- Prestages
- Inventory Preload
- Packages
- Get Packages
- Get single Package
- Update Package
- Delete Package
- Create Package
This project is a product of love for the Jamf Pro's APIs and the desire to make interactions simple. This project attempts to follow Microsoft's documentation for naming conventions.
Additionally, please review Jamf's Jamf Pro API Documentation
If you want to add to this project, please fork this repo and submit a pull request with the appropriate tagging.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Added some AmazingFeature
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request