PowerShell. PS C:\>Get-SmbShare -Name "VMS1" | Format-List Name : VMS1 ScopeName : Contoso-FS Path : I:\VMS Description : This command displays the information about the SMB share named 'VMS1' on the local computer as a formatted list.
Get-SmbServerConfiguration: Retrieves the SMB server configuration. Get-SmbServerNetworkInterface: Retrieves the network interfaces used by the SMB server. Get-SmbSession: Retrieves information about the SMB sessions that are currently established between the SMB server and the associated clients. Get-SmbShare: Retrieves the SMB shares on the computer.
PowerShell. PS C:\>Get-SmbShareAccess -Name "VMFiles" -ScopeName "Contoso-SO" | Format-List Name : VMFiles ScopeName : Contoso-SO AccountName : Contoso\Administrator AccessControlType : Allow AccessRight : Full Name : VMFiles ScopeName : Contoso-SO AccountName : Contoso\Contoso-HV1$ AccessControlType : Allow AccessRight : Full. This command displays the information about the ACL of an SMB share named VMFiles connected to the SMB server named Contoso-SO.
Example 1: Get SMB server configuration. PowerShell. PS C:\>Get-SmbServerConfiguration AnnounceServer : False AsynchronousCredits : 64 AutoShareServer : True AutoShareWorkstation : True CachedOpenLimit : 5 AnnounceComment : EnableDownlevelTimewarp : False EnableLeasing : True EnableMultiChannel : True EnableStrictNameChecking : True AutoDisconnectTimeout : 0 DurableHandleV2TimeoutInSeconds : 30 EnableAuthenticateUserSharing : False EnableForcedLogoff : True EnableOplocks : True ...
The SMBShare “Get-” Commands. The SMBShare module includes 11 different Get commands, for finding out the current state of affairs with your SMB shares and your SMB client configuration. Get-SmbClientConfiguration: This will tell you how a computer, either locally or remote through WMI connection, is configured. It returns items such as how long to stay connected (KeepConn) and how soon to consider a dropped session a timeout (SessionTimeout).
March 13th, 2014. Summary: Learn how to use Windows PowerShell to find SMB shares. How can I use Windows PowerShell to easily find a list of all the SMB shares on my Windows 8.1 laptop? Use the Get-SMBShare function.
You could manage file shares through PowerShell, but before PowerShell 3, it was not the most intuitive process. PowerShell 3 on Windows 8/Windows Server 2012 and higher introduced the SmbShare module. This module contains several commands that make managing file shares in Windows less of a headache.
Installation Options. Install Module. Azure Automation. Manual Download. Copy and Paste the following command to install this package using PowerShellGet More Info. Install-Module -Name xSmbShare -RequiredVersion 126.96.36.199. You can deploy this package directly to Azure Automation.