News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Powers-h*ll

    This topic contains 8 replies, has 3 voices, and was last updated by  PKCano 1 year, 6 months ago.

    • Author
    • #174008 Reply

      I’m running into some issues on my PS script, I was hoping you could help me with.
       I’m using a wsdl with powershell (something I’ve never done) to update the password for an account that resides in HP’s CMDB. We have a tool call Secret Server (owned by Thycotic), that will run the Powershell script after it’s completed, to automate the rotation of these HP account passwords.
      [Edited to remove HTML]
    • #174016 Reply

      Paul T
      AskWoody MVP

      The Lounge doesn’t like HTML. Can you post the details in plain text, or use BBCodes?

      cheers, Paul

      • #174026 Reply

        Da Boss

        If you use the “Text” tab at the top of the edit box when you cut/paste, I bellieve it will take the HTML out of the copy.

    • #174025 Reply


      Thanks for checking in Paul!

      [Edited to remove HTML]

    • #174038 Reply


      $url = “”

      $username = “Thycotic”

      $password = Read-Host -AsSecureString

      $creds = New-Object System.Management.Automation.PSCredential -ArgumentList $username, $password

      $webProxy = New-WebServiceProxy -Uri $url -Namespace UDCMDB -Credential $creds

      $cmdbContext = New-Object -TypeName UDCMDB.CmdbContext

      $cmdbContext.callerApplication = “SecretServerGetter”

      $GetCredReq = New-Object -TypeName UDCMDB.getCredentialsEntryRequest

      $GetCredReq.CmdbContext = $cmdbContext

      $GetCredReq.domainName = “DefaultDomain”

      $GetCredReq.protocolName = “ntadminprotocol” #the protocol name, this is where the creds are stored in the UDCMDB.

      $GetCredReq.credentialsEntryID = “352_1_CMS” #this is an identifier for the credentials stored in UDCMDB


      $entry.credentialsEntryParameters.bytesProps = #secret server sends password as string, we need to convert to byte array

      $webProxy.updateCredentialsEntry($entry) #send the payload back with the update password

      #test password update in UD

    • #174045 Reply

      Paul T
      AskWoody MVP

      What is the part you have issues with? Do you get any error messages?

      cheers, Paul

    • #174041 Reply


      Text tab used: let’s see if this works.


      EDIT – it worked but would have been a duplicate. So I deleted the meat and leave this note to say it was good.

    • #174048 Reply


      The password is stored as a byte array in UDCMDB, so I need to convert it to powershell (again something I’ve never done and can’t figure out with google). The script snippet above gets the credential object from UDCMDB. The returned result is the credentialsEntryParameters object. The object has a few properties on it that can be set – get. One of these properties is a byteProp properties, this is the passwords as far as we can tell. And this is the one I will need to update. Once update, we send the object back to the updateCredentialsEntry method. I can’t just update the password property and send that, doing so will null the rest of the values (username, etc.).

      • #174084 Reply

        Da Boss

        As an Anonymous poster, every one of your posts have to be moderated and may not appear immediately, depending on what is going on on the site. Pleas don’t re-post. Give us a few.

        If you register, after your first post there is no moderation delay. 🙂

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Powers-h*ll

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.