File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 5
5
This PowerShell script lists all network shares (aka "shared folders") of the local computer.
6
6
. EXAMPLE
7
7
PS> ./list-network-shares.ps1
8
- ✅ Shared folder \\LAPTOP\Public -> D:\Public ("Public folder for file transfer")
8
+ ✅ Shared folder \\LAPTOP\Public ("File transfer folder") -> D:\Public
9
9
. LINK
10
10
https://github.com/fleschutz/PowerShell
11
11
. NOTES
18
18
} else {
19
19
$shares = Get-WmiObject win32_share | where {$_.name -NotLike " *$" }
20
20
foreach ($share in $shares ) {
21
- Write-Output " ✅ Shared folder \\$ ( hostname) \$ ( $share.Name ) -> $ ( $share.Path ) ( `" $ ( $share.Description ) `" )"
21
+ Write-Output " ✅ Shared folder \\$ ( hostname) \$ ( $share.Name ) ( `" $ ( $share.Description ) `" ) -> $ ( $share.Path ) "
22
22
}
23
23
}
24
24
exit 0 # success
You can’t perform that action at this time.
0 commit comments