I don’t have a FS cluster with shares handy (only CSVs), but does it work if you use the shortname of the cluster?
--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ntpowershell...@googlegroups.com.
To view this discussion visit
https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2BgcVEV-V55dJ6_3YghuhrO01HOBRt4r1xET_xQkz0kOtg%40mail.gmail.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/465dc96af69946bbb17c3916a46cf60d%40smithcons.com.
If you execute it on the cluster, what is the scopename you use? And what is the scopename reported by the command?
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2Bi1%2B4fAvswB5hRoUWgn8bJiQqTndQs%3D-8KgGapU3E_M7Q%40mail.gmail.com.
ScopeName doesn’t appear to be the right parameter to target a remote computer (if I’m understanding the original request correctly). Try something like this:
$Shares = Invoke-Command -ComputerName 'NT_SAN1.wrk.ads.pha.phila.gov' -ScriptBlock {Get-SmbShare}
-Aakash Shah
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/2c4be4dd7da74cd1927ae5e8aba65183%40smithcons.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/2c4be4dd7da74cd1927ae5e8aba65183%40smithcons.com.
ScopeName doesn’t appear to be the right parameter to target a remote computer (if I’m understanding the original request correctly). Try something like this:
If you execute it on the cluster, what is the scopename you use? And what is the scopename reported by the command?
ScopeName doesn’t appear to be the right parameter to target a remote computer (if I’m understanding the original request correctly). Try something like this:
$Shares = Invoke-Command -ComputerName 'NT_SAN1.wrk.ads.pha.phila.gov' -ScriptBlock {Get-SmbShare}
On Mon, Oct 20, 2025 at 4:07 PM Aakash Shah <aakas...@uci.edu> wrote:ScopeName doesn’t appear to be the right parameter to target a remote computer (if I’m understanding the original request correctly). Try something like this:
$Shares = Invoke-Command -ComputerName 'NT_SAN1.wrk.ads.pha.phila.gov' -ScriptBlock {Get-SmbShare}
OK, so if I do that (use Invoke-Command), how then can I pass it values returned from the earlier call.
$using: Scope Modifier (PowerShell 3.0 and later):ScriptBlock. You simply prefix the local variable name with $using:.Feel free to file a documentation issue. They are paid attention to.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/CAHBr%2B%2Bik57v1Zxk%2BU6E48Wrxxc0vCDwfcvxbypcmu2jXDv0jUQ%40mail.gmail.com.
I think you might want: Get-SmbShare -CimSession "NT_SAN1.wrk.ads.pha.phila.gov"
--
John Wright
IT Support Specialist
![]()
1800 Old Bluegrass Avenue, Louisville, KY 40215
Please submit IT requests to Hazelwoo...@bluegrass.org
24 Hour Helpline 1.800.928.8000
CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>
On Behalf Of Mike Leone
Sent: Monday, October 20, 2025 2:55 PM
To: NTPowershell Mailing List <ntpowe...@googlegroups.com>
Subject: [ntpowershell] Using Get-SMBShare to list the shares of a clustered file server
|
EXTERNAL EMAIL - This email was sent by a person from outside your organization. Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity. |
--