PowerShell Custom Activity

Hello,

i am new to password manager and are looking on an how to remove a user from a group during a workflow.

But how to know about the user that is currently running the workflow so that i can use, for example, the samaccountname for my script?

I tried the following but getting an error message in the log.

$username = $Request["Username"]

remove-adgroupmember "groupname" -member $username -confirm:$false

It seems to be, that the varialbe $username is empty.

Thanks

Frank

Parents
  • I was missing the part where you send what you're looking for in the URL which is explained in the readmes that accompany the examples in the SDK


    Form and open the following URL:
    http://<pmserver>/PMUser/ws/<service_URL>?user=<user_sAMAccountName>&domain=<domain_FQDN>&passcode=<passcode>
    Where:
    - pmserver - name of the computer on which the Password Manager Service is installed.
    - service_URL - URL specified when creating the custom web service.
    - user_sAMAccountName - sAMAccountName of a user to whom a passcode is assigned.
    - domain_FQDN - fully qualified domain name of a domain to which the user belongs. Note: a connection to this domain must be configured in Password Manager.
    - passcode - the passcode assigned to the user.

    username and domain were empty because I wasn't sending them.

Reply
  • I was missing the part where you send what you're looking for in the URL which is explained in the readmes that accompany the examples in the SDK


    Form and open the following URL:
    http://<pmserver>/PMUser/ws/<service_URL>?user=<user_sAMAccountName>&domain=<domain_FQDN>&passcode=<passcode>
    Where:
    - pmserver - name of the computer on which the Password Manager Service is installed.
    - service_URL - URL specified when creating the custom web service.
    - user_sAMAccountName - sAMAccountName of a user to whom a passcode is assigned.
    - domain_FQDN - fully qualified domain name of a domain to which the user belongs. Note: a connection to this domain must be configured in Password Manager.
    - passcode - the passcode assigned to the user.

    username and domain were empty because I wasn't sending them.

Children
No Data