79138834

Date: 2024-10-29 20:13:09
Score: 0.5
Natty:
Report link

You could use WMI instead. This way you get a list of objects you can filter on.

Get-WmiObject -ComputerName computername -Class Win32_Share | Where-Object -FilterScript { !$_.Name.EndsWith('$') }

Let me know if it works for you.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: FranciscoNabas