The new Cloud Services module in PowerCLI 12 introduces cmdlets for easy user management automation of the VMware Cloud Services Platform. This will let you use PowerCLI to manage users for services such as VMware Cloud on AWS.
The new cmdlets in the CloudServices module are:
- Connect-Vcs
- Get-VcsOrganizationRole
- Get-VcsService
- Get-VcsServiceRole
- Get-VcsUser
- Get-VcsUserInvitation
- New-VcsUserInvitation
- Remove-VcsUser
- Remove-VcsUserInvitation
In addition, the New-VcsOAuthSecurityContext cmdlet has been transferred over from the VMCmodule to CloudServices module.
Let’s walk through how to use these within your own the VMware Cloud Services Platform Organization.
Connect to your Organization
The first cmdlet creates a new connection to a specific organization – Connect-Vcs. You can establish a connection by an ApiToken. You can generate an Api Token from the VMC client My Account –> Api Tokens -> Generate Token.
You can also create an OAuth app from the VMware Cloud Services Platform: Organization -> OAuth Apps -> Create App -> Server to server app -> Create
Give your app a name and description, and do not forget to assign the appropriate organization and service roles.
The application will generate a clientId and clientSecret which you can use to establish an OAuth security context.
Note that connecting via a Server to server app is also available in VMC module.
Invite a new user to join your Organization
The next cmdlet is the New-VcsUserInvitation. You can create user invitation by specifying user’s email address and the organization roles which the user will have. You can also specify the service roles, but this parameter is optional. You can list available organization and service roles using the Get-VcsOrganizationRole and Get-VcsServiceRole cmdlets.
Using Get-VcsOrganizationRole we get all organization roles and by Get-VcsServiceRole we get all available roles for Aws services. The user invitation is created for user with email username@mail.com with the specified organization and service roles. An email will be sent to the email address with a link for a confirmation. When the user confirms the invitation is no longer available, but a new user is created. Note that if you send an invitation to a user that is already registered no invitation will be send, but the user will be directly added to the organization.
List available user invitations
If you want to review user invitations that you have created or just check if a user is already invited Get-VcsUserInvitation is the right cmdlet for the purpose.
In our case the only pending user invitation is the one we have just created.
List available users
When a user accepts an invitation, the invitation is removed, and it turns into a user account. You can easily check existing users by using Get-VcsUser cmdlet.
By executing this command, we retrieved all available users whose names starts with “A”.
Remove user invitation
You can remove a user invitation or group of user invitations by using the Remove-VcsUserInvitation cmdlet as shown in the example below.
Remove user
You also can remove users from the organization.
We can get the user(s) which we want to remove using the Get-VcsUser cmdlet and then pass them to the Remove-VcsUser cmdlet.
With this quick overview, you should hopefully be able to automate user management for your VMware Cloud services, including especially VMware Cloud on AWS.
Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks
Aroma Indian Cuisine is the best Indian Restaurant Epping. We have the best Indian food around and an atmosphere to match. Our recipes are authentic and time-tested.
Andaz is just another celebration of life!
Sumptuous Indian traditional palate presented with style!
Our Love for food We cook spicy curries through to a great mild butter chicken. Our menu will appeal to all connoisseurs of traditional Indian cuisine. At India Gate Belgrave we strive to always use the freshest produce and provide you with authentic and delicious Indian food.
Chulho is a Traditional Nepali stove that is made out of the mud. People in rural areas, where the sophisticated modern gas stoves are not as common, use it for cooking purposes. Also, the people in many parts of Terai & Hills use it as an alternative cooking oven. After 16 years in the restaurant business, 9 Years in farming, and several years dedicated to the study of nutrition, we decided now was the right time to take all that experience and synthesize it into a local eatery where people can enjoy exquisite food, support local food producers, and eat the kind of food they can feel good about.
Tandoori curry house proudly celebrates the authenticity of Indian cuisine. Brought to life are the flavors that travel all over the world and beloved by so many. Come and enjoy our creamy and rich Butter chicken, on the spot bake Tandoori breads and charcoal cooked kebabs and tikkas.
Amazing article, as always! Thanks for all the solid gold advice.
Thanks a lot for the epic post!
This is a great article with valuable information. you can check my blog too.
I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.
Such intelligent work on the subject and ideal way of writing here. I am really impressed! wazifa for husband to come back
thank you for this! really appreciate you doing this
hazır e ticarette Türkiye’nin önde gelen firması ile çalışma fırsatı yakalayın