description | external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|---|
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell. |
FileShare.cdxml-help.xml |
Storage |
12/20/2016 |
2.0.0 |
Get-FileShare |
Retrieves file share objects and their properties.
Get-FileShare [-Name <String[]>] [-Protocol <FileSharingProtocol[]>] [-FileServer <CimInstance>]
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [<CommonParameters>]
Get-FileShare [-UniqueId <String[]>] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob]
[<CommonParameters>]
Get-FileShare [-Name <String[]>] [-Protocol <FileSharingProtocol[]>] [-Volume <CimInstance>]
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [<CommonParameters>]
Get-FileShare [-Name <String[]>] [-Protocol <FileSharingProtocol[]>] [-Subsystem <CimInstance>]
[-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [-AsJob] [<CommonParameters>]
The Get-FileShare cmdlet gets objects that correspond to the file shares on the specified server. You must have local administrator credentials on a server to retrieve the objects.
PS C:\>Get-FileShare
This command lists all the file shares on the local server. You must have local administrator permissions on the server to run this command.
PS C:\>Get-FileShare -Protocol NFS -FileServer (Get-StorageFileServer -FriendlyName "FileServer01")
This command lists all NFS file shares on the file server named FileServer01. You must have local administrator credentials on the server to run this command. The command gets the file server by using the Get-StorageFileServer cmdlet.
Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: CimSession[]
Parameter Sets: (All)
Aliases: Session
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the file server on which the file share is hosted. To obtain a FileServer, use the Get-StorageFileServer cmdlet.
Type: CimInstance
Parameter Sets: ByFileServer
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies the name of the file share to get.
Type: String[]
Parameter Sets: ByFileServer, ByVolume, BySubsystem
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the file sharing protocol of the file shares that this cmdlet gets. The acceptable values for this parameter are: SMB and NFS.
Type: FileSharingProtocol[]
Parameter Sets: ByFileServer, ByVolume, BySubsystem
Aliases:
Accepted values: NFS, SMB
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the storage subsystem from which to get file shares. To obtain a StorageSubsystem object, use the Get-StorageSubSystem cmdlet.
Type: CimInstance
Parameter Sets: BySubsystem
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Specifies the maximum number of concurrent operations that can be established to run the cmdlet.
If this parameter is omitted or a value of 0
is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer.
The throttle limit applies only to the current cmdlet, not to the session or to the computer.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies a unique ID.
Type: String[]
Parameter Sets: ByUniqueId
Aliases: Id
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specified the volume object that contains the file share to get. To obtain a volume, use the Get-Volume cmdlet.
Type: CimInstance
Parameter Sets: ByVolume
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
- When used in Failover Cluster, cmdlets from the Storage module operate on cluster level (all servers in the cluster).