login vsi company logo login vsi company logo 250x40
  • Home
  • Blog
  • Login PI
  • How to: Login PI bulk administration – changing a profile’s workload using a CSV file

How to: Login PI bulk administration – changing a profile’s workload using a CSV file

The previous blog post explained the basics around using the Login PI RESTful API through Powershell. This blog post will build on that foundation to change the workload assigned to profiles based on a CSV file instead of assigning the same workload to each server.

The use case for this script is a large-scale Login PI customer that needs to change the workload assigned to profiles regularly. Since the PI interface is intended for small-scale changes the API is used. As the API allows large bulk operations with ease.

The first step is to define the variables that will be reused. This will be the same variable used in the previous blog post. The PIbaseURL points to the location where the PI backend is hosted. In this example, the default port of 8080 is used.

PIbaseURL

Next the script will retrieve all the available profiles. The profiles are stored in a variable for later reference.

PIbaseURL2

Now that the profiles are retrieved the CSV file needs to be read. Powershell has built-in mechanisms to deal with CSV files. Making it very easy to deal with CSV files. Please note that for this example the CSV file used has a very specific structure. The first row is the title for the column.

CSV file

By giving the column a title Powershell can refer to the row by using an object property after loading the CSV file.

csvFile

This tells Powershell to load a CSV file from the indicated path and store the content in a variable.

CSV file import

After the import the contents of the CSV file can be referenced to by using object properties.

The script will then iterate through the CSV file based on the server name specified. In this use case the customer had a profile for every server they wanted to directly connect to. The use case allows the script to identify the profile based on the server that is being connected to. As the name of the profile will match the server name. Your profile names may be different. Just be aware that this script will assign the workload based on the name of the profile.

foreach

This line tells Powershell that the script wants to do something with every line of the CSV file based on the server column.

At the point the script will retrieve the id assigned to the profile based on the name of the profile as stored in the CSV file. The script will also assign the workload name from the CSV file to the serverWorkload variable. That will allow the rest of the script to be copy/pasted from the previous script.

serverID

The rest of the script is the same as the script from the previous blog post. Except for the workload not being hardcoded but taken from the CSV file

profileURL

With the basics behind the Login PI RESTful API and taking information from a CSV file covered the next installment in this series will cover finding the API endpoints to automate pretty much anything in the Login PI configuration.

Do you have a use case for Login PI that may seem out of the range of the capabilities for Login PI? The Login VSI Professional Services team has completed thousands of custom fit solutions for challenging use cases. Feel free to reach out to us at support@loginvsi.com with your questions and how we can provide a solution that will improve your overall end user experience.

Disclaimer: many of the API endpoints mentioned in this blog post are not supported. Meaning they may change from release to release. This blog post is therefore provided AS-IS.

 

Our industry-standard software is built to help you avoid problems, lower costs and improve performance. Request a Quote or get your (free!) Trial below, and benefit from our award-winning services:

Request Quote Request Trial

 

 

About the author

Dennis Geerlings started at Login VSI about 4 years ago and worked as a consultant within Login Consultants. He supported multiple customers in migration projects. Presently, Dennis is support manager and lead consultant at Login VSI. In these roles he supports customers and partners in the US and Canada, co-develops the Login VSI product, and serves as a pre-sales engineer for enterprise customers. 


Tags: Login PI

Popular Blogs

login-vsi-vdi-performance-summit

The VDI Performance Summit - Virtual Conference and Expo

Visit the VDI Performance Summit to gain knowledge and experience about performance and tuning VDI, improving End-User Experience and IT service. Join us at the ONLY virtual event 100% dedicated to VDI performance and tuning | May 2, 2019 This 1-day event offers key-notes presented by the best VDI performance experts in the world, technical and business oriented breakout sessions, the possibility to chat with experts directly to discuss your own situation, and a virtual exhibit hall featuring… Continue Reading

Scalability testing Parallels Remote Application Server with Login VSI

Recently I went to VMworld in Barcelona where Login VSI had a booth on the expo... While I can’t remember exactly how many conversations I had - there had been so many that I lost my voice on day one. What was new this year is that quite a few people asked if our software is compatible with the solutions from Parallels specifically their Remote Application Server (RAS) (Datasheet). Continue Reading
Login VSI Blog Article - Microsoft Windows 10 Default FTA Associations - Teaser Image

Windows 10 Default File Type Associations and Login VSI

When Login VSI 4.1 was released, the majority of desktops were running Windows 7 and life was easy. We’d set the default filetype for an application and it would simply work. The default and industry standard workloads in Login VSI include launching and using Adobe Reader as part of the virtual user simulation. Because Login VSI doesn’t always know which version of Adobe Reader is installed, or where it’s installed, the workload relies on the file type association (FTA) for .pdf documents to be… Continue Reading
Login VSI - Press Release - IGEL - Login VSI Partner to Optimize End User Computing Experience Image

[Press Release] IGEL Partners with Login VSI to Optimize the End User Computing Experience

Login PI enables organizations to better protect the performance and availability of their IGEL OS-powered virtual desktop environments San Francisco, USA, Feb. 6, 2019: IGEL, a world leader in software-defined endpoint optimization and control solutions for the secure enterprise, today announced that it is partnering with Login VSI, provider of software solutions to test and actively monitor the performance and availability of virtual desktop environments, including VDI and… Continue Reading
Login VSI - Blog - Login PI Blog Teaser Image - Windows Virtual Desktop: How To Monitor User Experience With Login PI

Windows Virtual Desktop – How to Monitor User Experience?

Microsoft has just announced the public preview of their new Windows Virtual Desktop (WVD) offering at Microsoft Ignite on Tour in Amsterdam today. For those of you who’ve not followed the rumors or the private beta, here’s the outline... Continue Reading
Investigating Online Application Performance with Login PI

Investigating Online Application Performance with Login PI

As many companies do, we use a CRM system. Recently, I have been getting complaints about our cloud CRM system, Microsoft Dynamics, being slow. I tried to investigate this by shadowing one of our users to see what was wrong. As expected, everything was fast. 15 minutes later, the same user reported slowness again. How could I investigate this without bothering the users? Continue Reading
Cookie Settings