- CheckMates
- :
- Products
- :
- Developers
- :
- API / CLI Discussion
- :
- User management with mgmt_cli.exe
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
User management with mgmt_cli.exe
Hello,
I'm trying to write a simple powershell toolbox to help us manage some of our more manual tasks with checkpoint. Mainly user related.
We are currently running 80.20
I'm able to query users through from mgmt_cli via show objects, this lets me see expiring users
$temp = .\mgmt_cli.exe show objects limit 500 offset 0 order.1.ASC "name" in.1 "name" in.2 "userprefix*" type "object" details-level full -m servername --format json --session-id $sid
$all = $temp | ConvertFrom-Json
foreach($acc in $all.objects){
if(HasProperty $acc "expirationdate"){
try{
$expdate = [datetime]::Parse($acc.expirationdate)
} catch {
write-host ("date error for record: " + $acc.name)
}
*Play with or return user details here*
}
}
I'm hoping to be able to change users expiry dates, create new users, add users to groups etc.
Is this possible through mgmt_cli?
Are there better ways to do this that can be done from powershell?
I have a vague assumption from reading through other threads that it's going to involve generic-objects but I'm not sure how to properly use them.
Thanks =]
- Labels:
-
General
-
Object Management
- Tags:
- mgmt_cli
- powershell
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content