0

I need to get a list of shared drives on a remote computer that has Windows 7 from a host PC with Windows 10 in PowerShell. I already tried the following in PowerShell ISE as both an admin and a standard user.

Get-WmiObject Win32_MappedLogicalDisk -computer <computername> | select name, providername

This method didn't work.

Run5k
  • 15,723
  • 24
  • 49
  • 63
user681988
  • 1
  • 1
  • 1

1 Answers1

0

It looks like the correct class is

get-WmiObject -class Win32_Share -node

(where node is the Computer Name or IP Address)

You should provide any error messages you get and some context (i.e. are the computers joined to the same domain? Are they connected to the same physical network?)

Also, make sure user permissions and firewall settings are compatible with what you're trying to do.

Have a look here: PowerShell Get List Of Folders Shared