Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeremy_Parker
Participant
Jump to solution

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 =]

1 Solution

Accepted Solutions
Joshua_Hatter
Employee
Employee
0 Kudos
1 Reply
Joshua_Hatter
Employee
Employee
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events