locked
How do I get the same results in powershell with this command. wmic netuse get name, username RRS feed

  • Question

  • I'm trying to find this command and able to run remotely with powershell 

    wmic netuse get name, username
    Name                                  UserName
    \\server1\diffdomain            Tatum\user1
    \\server2\Users (Y:)                       corp\user1
    \\server3\ProdEval (Z:)           tatum\user1

    Wednesday, July 12, 2017 6:11 PM

All replies

  • This works in PowerShell:

    wmic /node:remotepc netuse get "name,username"


    \_(ツ)_/

    Wednesday, July 12, 2017 6:24 PM
  • You can try this:

    Get-WmiObject Win32_NetworkConnection -ComputerName sbs01 | select *


    \_(ツ)_/

    Wednesday, July 12, 2017 6:27 PM
  • Hi JRV,

    I ran that command and it didn't seem to work it shows alot of information but nothing I need. 

    Tuesday, July 18, 2017 12:03 AM
  • It is exactly the same information.

    I recommend that you start by learning PowerShell.  Next spend some time studying WMI.  Until you have mastered the basics of these two technologies you will have a hard time with this.

    This is your exact query in PowerShell:

    Get-WmiObject Win32_NetworkConnection -ComputerName sbs01 | select Name, Username


    \_(ツ)_/

    Tuesday, July 18, 2017 12:10 AM