Get-SmbShare

Get-SmbShare

Retrieves the Server Message Block (SMB) shares on the computer.

構文

Parameter Set: Query (cdxml)
Get-SmbShare [[-Name] <String[]> ] [[-ScopeName] <String[]> ] [-AsJob] [-AvailabilityType <AvailabilityType[]> ] [-CachingMode <CachingMode[]> ] [-CaTimeout <UInt32[]> ] [-CimSession <CimSession[]> ] [-ConcurrentUserLimit <UInt32[]> ] [-ContinuouslyAvailable <Boolean[]> ] [-EncryptData <Boolean[]> ] [-FolderEnumerationMode <FolderEnumerationMode[]> ] [-IncludeHidden] [-Scoped <Boolean[]> ] [-ShareState <ShareState[]> ] [-Special <Boolean[]> ] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

詳細説明

The Get-SMBShare cmdlet retrieves objects that represent the Server Message Block (SMB) shares being displayed by the computer.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-AvailabilityType<AvailabilityType[]>

Specifies the cluster type of the shares being enumerated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CachingMode<CachingMode[]>

Specifies the caching mode of the shares being enumerated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CaTimeout<UInt32[]>

Specifies the continuous availability timeout of the shares being enumerated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-CimSession<CimSession[]>

リモート セッションまたはリモート コンピューターでコマンドレットを実行します。New-CimSession コマンドレットや Get-CimSession コマンドレットの出力など、コンピューター名またはセッション オブジェクトを入力します。既定値は、ローカル コンピューターで実行中の現在のセッションです。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ConcurrentUserLimit<UInt32[]>

Specifies the concurrent user limit of the shares being enumerated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ContinuouslyAvailable<Boolean[]>

Indicates that the shares being enumerated should be continuously available.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-EncryptData<Boolean[]>

Indicates that the shares being enumerated should be encrypted.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-FolderEnumerationMode<FolderEnumerationMode[]>

Specifies the folder enumeration mode of the shares being enumerated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-IncludeHidden

Indicates that shares that are created and used internally are also enumerated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Name<String[]>

Specifies one or more SMB shares by share name.

エイリアス

なし

必須?

false

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

true

-Scoped<Boolean[]>

Indicates that the shares to be numerated should be scoped.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ScopeName<String[]>

Specifies the scope of the share by name.

エイリアス

なし

必須?

false

位置は?

3

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ShareState<ShareState[]>

Specifies the state of the shares being enumerated.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Special<Boolean[]>

Indicates that the shares to be numerated should be special. Admin share, default shares, IPC$ share are examples of special shares.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ThrottleLimit<Int32>

このコマンドレットを実行するために確立できる最大同時操作数を指定します。このパラメーターを省略するか、値として 0 を入力した場合、Windows PowerShell® では、コンピューターで実行している CIM コマンドレットの数に基づいて、コマンドレットに対する最適なスロットル制限を計算します。スロットル制限は現在のコマンドレットのみに適用され、セッションまたはコンピューターには適用されません。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • System.String

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/SMB/MSFT_SmbShare

    Microsoft.Management.Infrastructure.CimInstance オブジェクトは、Windows Management Instrumentation (WMI) オブジェクトを表示するラッパー クラスです。シャープ記号 (#) の後のパスは、基になる WMI オブジェクトの名前空間とクラス名です。
    The MSFT_SmbShare object represents the SMB shares on the computer.

EXAMPLE 1

This example retrieves the SMB shares on the computer.

PS C:\> Get-SMBShare

EXAMPLE 2

This example retrieves the SMB shares on the computer named VMS1.

PS C:\> Get-SmbShare –Name VMS1

EXAMPLE 3

This example displays the information about the SMB shares on the computer named VMS1.

PS C:\> Get-SmbShare –Name VMS1 | Format-List

EXAMPLE 4

This example displays all of the information about the SMB shares on the computer named VMS1.

PS C:\> Get-SmbShare –Name VMS1 | Format-List –Property *

EXAMPLE 5

This example retrieves the SMB shares on the computer with scaled out availability.

PS C:\> Get-SmbShare | Where-Object -Property AvailabilityType -Eq ScaleOut

EXAMPLE 6

This example retrieves the SMB shares on the computer that are connect to the SMB server named Contoso-FS.

PS C:\> Get-SmbShare -ScopeName Contoso-FS

関連トピック

New-SmbShare

Remove-SmbShare

Set-SmbShare