9 Comments

      • Sebastian

        Hi Jon
        Thanks for your reply 🙂

        I’am searching for:
        , ,

        Are there any chances to get only that values?
        Thanks in advanced.

        regards, sebastian

        • Sebastian

          I see that there was a Problem with the Values, so again without the tags: StartDate, EndDate, DaysLeft

          • Get-DellAssetInformation "6ZL84R1" | Select-Xml -XPath "/ArrayOfAsset/Asset/ns:Entitlements/ns:EntitlementData" -Namespace @{ns="http://support.dell.com/WebServices/"} | Select -expand node | Select StartDate,EndDate,DaysLeft;

  1. Sebastian

    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?

    • 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";
      }

      • Sebastian

        Thanks for your help Jon
        Now its perfect! 🙂

        Really a great script.

        Greetings from Germany.
        Have a nice day.

        regards, sebastian

Leave a Reply

Your email address will not be published. Required fields are marked *