VMware Workspace ONE Community
henkor
Enthusiast
Enthusiast

PowerShell scripts to manage devices

is there any place that there are examples of scripts to manage devices with powershell?
via REST API ?
any repository....

i wrote a script to connect my environment search for devices that not seen for X days, and delete them from my console.
im looking for any other helpful scripts


thanks,
Labels (1)
8 Replies
JohnMarler
Enthusiast
Enthusiast

We were trying to do the same thing - would you be willing to share your script? Thanks in advance.
0 Kudos
BRIANJENKINSBRI
Enthusiast
Enthusiast

I'm working on a script to perform the same action. I'd love to coordinate with you and compare how you are performing the task. Mine has run into a few snags. We also have other scripts that use APIs to manage other items in the console if you'd like to discuss. FYI, John M. and I are colleagues.
0 Kudos
henkor
Enthusiast
Enthusiast

you can contact me in private
0 Kudos
DaHaLHH
Contributor
Contributor

Why in private and not just here?
I've also started to write powershellscripts which uses API-Calls and still are interested in it 🙂
0 Kudos
henkor
Enthusiast
Enthusiast

send me your email and ill talk with you
0 Kudos
DaHaLHH
Contributor
Contributor

That's not the idea of a communityforum 🙂
0 Kudos
JuanenSp
Contributor
Contributor

Hello WSOne mates!

Few days ago I was asking the same question to WSOne support but I didn't receive too much help.

However I have some links you may like: https://code.vmware.com/samples?categories=Sample&tags=Product%20Provisioning

And the most wanted for me is this, where I finally find an explanation about how WSOne understand the powershell scripts depending if they were launched as Admin, System or User.

https://techzone.vmware.com/using-product-provisioning-deliver-files-windows-10-vmware-workspace-one...

I will appreciate any other samples you can share.

0 Kudos
BRIANJENKINSBRI
Enthusiast
Enthusiast

From my experience, the scripts can be ran from whatever account, assuming the account the scripts run under has the correct rights to perform the tasks required by the scripts, which could range from accessing a network share, or sending email notifications out as a specific account. 
The script itself needs to input the correct Auth code and tenant code to access the WS1 APIs, which can be accomplished by having specified accounts that have been created in the WS1 console with API rights.
We also use Postman to test the APIs and ensure they will give us the correct data (GET) we are looking for, or will perform the proper action we are looking to perform (PUT, POST, DELETE).
0 Kudos