get-counter in powershell 7 core is not recognized

Welcome Forums General PowerShell Q&A get-counter in powershell 7 core is not recognized

  • This topic has 4 replies, 3 voices, and was last updated 4 months ago by
    js
    Participant
    .
Viewing 3 reply threads
  • Author
    Posts
    • #180078
      Participant
      Topics: 1
      Replies: 0
      Points: -8
      Rank: Member

      Hi all,
      i was running Get-counter command in powershell 7 core. i am getting bellow error.  i try to use Install-Module WindowsCompatibility utlity but still i am not able to use in core edition both 6 and 7 but i can run in powershell 5

      "get-counter : The term 'get-counter' is not recognized as the name of a cmdlet, function, script file, or operable program.
      Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
      At line:1 char:1
      + get-counter
      + ~~~~~~~~~~~
      + CategoryInfo : ObjectNotFound: (get-counter:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException"
      
    • #180087
      Senior Moderator
      Topics: 8
      Replies: 1155
      Points: 4,019
      Helping Hand
      Rank: Community Hero

      Using compatibility module, this is how it is.

      Invoke-WinCommand -ScriptBlock {Get-Counter}
      
    • #180132
      js
      Participant
      Topics: 27
      Replies: 742
      Points: 2,030
      Helping Hand
      Rank: Community Hero

      What is get-counter?

      • #180177
        Senior Moderator
        Topics: 8
        Replies: 1155
        Points: 4,019
        Helping Hand
        Rank: Community Hero

        cmdlet to get the performance counter.

      • #180210
        js
        Participant
        Topics: 27
        Replies: 742
        Points: 2,030
        Helping Hand
        Rank: Community Hero

        Oops, I was looking in osx.

    • #180345
      Participant
      Topics: 0
      Replies: 1
      Points: 8
      Rank: Member

      get-counter?

Viewing 3 reply threads
  • The topic ‘get-counter in powershell 7 core is not recognized’ is closed to new replies.