Login PI bulk administration through RESTfull API and Powershell
For a large Login PI deployment a method was needed to change the workload on all profiles. The Login PI RESTfull API (API) easily enables this. To get started create a Powershell script. For this blogpost the Windows Powershell ISE was used.
Create the variables that will be reused. In this case the PI base URL. This script will be ran directly on the PI server. This script assumes PI is installed on the default port 8080. These values will need to be changed if the PI server is configured for SSL. See https://loginvsi.zendesk.com/hc/en-us/articles/115004469265-Login-PI-Configure-Management-Console-for-SSL.
The second variable is the workload that the script will set on every profile. In this case one of the default workloads.
Next the script will collect all the available profiles on the PI server. The script first defines where those profiles will be retrieved. The PI base URL was defined earlier. The profilesapi/profiles path was retrieved using a method that will be described in a future blog post.
Using the profiles API URL the script will retrieve all available profiles using the invoke-restmethod command. Note that UseDefaultCredentials is specified. Login PI uses authenticated API endpoints. This parameter specifies that the credentials of the user running the Powershell script should be passed to the API endpoint for authentication. This assumes that the user account running the script is a Login PI administrator. The profiles are stored in a variable for later use.
Read the entire article here, Login PI bulk administration through RESTfull API and Powershell
via the fine folks at LoginVSI