9 Replies to “Jon Gurgul”

  1. Thanks Jon
    really thanks for your help!
    I put the Output on a var, and with [1] i get only the first 3 values StartDate, EndDate, DaysLeft. Normaly i get this lines 3 times.

    But how can i cut/trim/edit the string in just the values?
    “@{StartDate=2011-02-10T00:00:00; EndDate=2014-02-11T00:00:00; DaysLeft=327}”
    thats the Output at the Moment.

    I want each value in an extra variable, is that possible?

    1. A variable example looping thru each returned entry:

      Get-DellAssetInformation "6ZL84R1" | Select-Xml -XPath "/ArrayOfAsset/Asset/ns:Entitlements/ns:EntitlementData" -Namespace @{ns="http://support.dell.com/WebServices/"} | Select -expand node |%{
      $StartDateVariable = $_.StartDate;
      $EndDateVariable = $_.EndDate;
      $DaysLeftVariable = $_.DaysLeft;
      Write-Host "Started on "$StartDateVariable" End on "$EndDateVariable" "$DaysLeftVariable" day(s) remaining";
      }

      1. Thanks for your help Jon
        Now its perfect! 🙂

        Really a great script.

        Greetings from Germany.
        Have a nice day.

        regards, sebastian

Leave a Reply