Allow passing connection info as string params, better instructions
This commit is contained in:
parent
19c89ed3e6
commit
6d5d696012
3 changed files with 36 additions and 9 deletions
24
README.md
24
README.md
|
@ -1,3 +1,23 @@
|
|||
# Apple Business Manager API Module for PowerShell
|
||||
To use this module, you'll need to convert the private key from Apple to a .NET friendly format:
|
||||
```openssl pkcs8 -topk8 -inform PEM -outform PEM -in [path to your key from Apple] -out [path to where you want to save the converted key] -nocrypt```
|
||||
PowerShell Module that authenticates and gets data from the Apple Business Manager APIs
|
||||
## Installing the module
|
||||
This module can be installed [from the PowerShell Gallery][powershell-gallery] using the following command:
|
||||
```PowerShell
|
||||
Install-Module -Name AMBPS
|
||||
```
|
||||
## Converting your private key
|
||||
The private key that you can download from the Apple Business Manager portal isn't in a format that is currently supported. To use this module, you'll need to convert it, for example, using openssl:
|
||||
```shell
|
||||
openssl pkcs8 -topk8 -inform PEM -outform PEM -in FROM_APPLE_PATH.pem -out CONVERTED_PATH.pem -nocrypt
|
||||
```
|
||||
# Using the module
|
||||
After converting, you can connect to Apple Business Manager's APIs with the following commands, then use other commands to retrieve data:
|
||||
```PowerShell
|
||||
$PrivateKey = (Get-Content -Path 'CONVERTED_PATH.pem') -join ''
|
||||
|
||||
Connect-AppleBusinessManager -ClientId 'YOUR_CLIENT_ID' -PrivateKey $PrivateKey -PrivateKeyId 'YOUR_PRIVATE_KEY_ID'
|
||||
|
||||
Get-AppleBusinessManagerOrgDevices
|
||||
```
|
||||
|
||||
[powershell-gallery]: https://www.powershellgallery.com/packages/ABMPS/
|
Loading…
Add table
Add a link
Reference in a new issue