Set-HPSureAdminDevicePermissions



Summary

Sets one or multiple device permissions on the HP Sure Admin Key Management Service (KMS)

Syntax

Set-HPSureAdminDevicePermissions [-KMSUri] <String> [-JsonFile] <FileInfo> [[-CacheAccessToken]] [<CommonParameters>]

Set-HPSureAdminDevicePermissions [-KMSAppName] <String> [-JsonFile] <FileInfo> [[-CacheAccessToken]] [<CommonParameters>]

Description

Device permissions allow IT administrators to manage local access of specific devices without having to provision a unique LAK key for each one. This command sends an HTTP request for mapping a device serial number to a user email, or to an AAD group. The connection with the KMS server requires the user to authenticate with a valid Microsoft account. Existing mappings are modified by the last configuration uploaded.

Parameters

Name Argument Description
KMSUri <String> Specifies the complete URI for uploading the permissions (I.e.: https://.azurewebsites.net/). This URL must be HTTPS.
KMSAppName <String> Specifies the application name on Azure KMS server that will be used to compose the URI for uploading the key
JsonFile <FileInfo> Specifies the path to the Json file containing multiple device permissions. JSON file must be structured as follows:
[{"deviceId":"XYZ321","userEmailAddress":"user@kms.onmicrosoft.com","adGroupName":""},
{"deviceId":"XYZ123","userEmailAddress":"user@kms.onmicrosoft.com"},
{"deviceId":"ZYX321","adGroupName":"admins"},
{"deviceId":"ABC000","userEmailAddress":"user@kms.onmicrosoft.com","adGroupName":"admins"}]
CacheAccessToken If specified, the access token is cached in msalcache.dat file and user credentials will not be asked again until the credentials expire.
This parameter should be specified for caching the access token when performing multiple operations on the KMS server.
If access token is not cached, the user must re-enter credentials on each call of this command.

Notes

  • Supported on Windows Power Shell v5.
  • Supported on Windows Power Shell v7.
  • An HP Sure Admin KMS server is required for using this feature.

Examples


PS C:\> Set-HPSureAdminDevicePermissions -SerialNumber "XYZ123" -KMSAppName "MyAppName" -UserEmail "myuser@myappname.onmicrosoft.com"

PS C:\> Set-HPSureAdminDevicePermissions -SerialNumber "XYZ123" -KMSUri "https://MyKMSURI.azurewebsites.net/" -AADGroup "MyAADGroupName"

PS C:\> Set-HPSureAdminDevicePermissions -JsonFile MyJsonFile.json -KMSAppName "MyAppName" -CacheAccessToken