locked
Problem writing code RRS feed

  • Question

  • From the powershell prompt I would like to run this command: (Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

    but typing in power shell the () brackets become <> less and greater, why that?

    Thank's

    Simone

    Thursday, March 1, 2018 1:26 PM

All replies

  • Something is wrong with your machine or keyboard is mapped incorrectly, not a powershell issue

    If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful. (99,108,97,121,109,97,110,50,64,110,121,99,97,112,46,114,114,46,99,111,109|%{[char]$_})-join''

    Thursday, March 1, 2018 1:33 PM
  • Are you sure? Because it happens exclusively in powershell, for example in notepad i can correctly type the brackets.
    Thanks again
    Simone
    Thursday, March 1, 2018 1:45 PM
  • Consider that the font you are using makes the PowerShell console appear that way.  Does the line of code work?


    \_(ツ)_/

    Thursday, March 1, 2018 1:53 PM
  • Ok

    The code don't work and report me an error when i execute it for te husing of characters < and >



    • Edited by xtow Thursday, March 1, 2018 3:50 PM
    Thursday, March 1, 2018 3:45 PM
  • Then you need to fix your system.  We can't help you with that.

    \_(ツ)_/

    Thursday, March 1, 2018 4:03 PM
  • sorry...in the powershell commandline it's not possible use paste command? so i can bypass my problem ( my last way ) 
    Saturday, March 3, 2018 2:34 PM
  • do it the real powershell way.

    Get-WmiObject -query 'select * from SoftwareLicensingService' | Select-Object -ExpandProperty OA3xOriginalProductKey


    Regards kvprasoon

    Saturday, March 3, 2018 8:13 PM
  • Hi,
    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

    Best Regards,

    Frank

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Monday, March 5, 2018 6:54 AM
  • Hi,

    Was your issue resolved? 

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.
    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.
    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,
    Frank

    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, March 8, 2018 9:08 AM