Powershell Command Output (and trim)

Forums Desktop Info Powershell Command Output (and trim)

Viewing 3 reply threads
  • Author
    Posts
    • #2488 Reply
      AvatarCurious James

      Hello,

      I’d very much like to get a powershell command output onto my desktop info.

      Basically the command is “wmic computersystem get model” it will output something like below, so I then need to also trim everything but the useful info (in this case “Inspiron 15 7000 Gaming”)
      Example output:
      “Model

      Inspiron 15 7000 Gaming

      If someone could help me I’d be most grateful!

      0
    • #2490 Reply
      GlennGlenn
      Keymaster

      That’s not powershell, that’s WMI. Here’s a DTI item to make that call:

      WMI=active:1,text:Model,namespace:root\cimv2,query:Win32_ComputerSystem,display:%model%
      
      1+
    • #2491 Reply
      AvatarCurious James

      Thanks Glenn!

      I’ve put that in the config though and on my (good/odd?) laptop it’s coming up as ‘[Error] Invalid parameter’ on the desktopinfo display.

      Does it work for you?

      Thanks!

      0
    • #2492 Reply
      AvatarCurious James

      Oh dear, turns out it was because of the version I was running, works perfectly on 2.2, thanks so much!

      0
Viewing 3 reply threads
Reply To: Powershell Command Output (and trim)
Your information:




Do NOT follow this link or you will be banned from the site!