Get-SmbOpenFile

Get-SmbOpenFile

Retrieves basic information about the files that are open on behalf of the clients of the Server Message Block (SMB) server.

構文

Parameter Set: Query
Get-SmbOpenFile [[-FileId] <UInt64[]> ] [[-SessionId] <UInt64[]> ] [[-ClientComputerName] <String[]> ] [[-ClientUserName] <String[]> ] [[-ScopeName] <String[]> ] [[-ClusterNodeName] <String[]> ] [-AsJob] [-CimSession <CimSession[]> ] [-IncludeHidden] [-ThrottleLimit <Int32> ] [ <CommonParameters>]

詳細説明

The Get-SMBOpenFile cmdlet retrieves basic information about the files that are open on behalf of the clients of the Server Message Block (SMB) server.

パラメーター

-AsJob

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-CimSession<CimSession[]>

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

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-ClientComputerName<String[]>

Specifies the filters for the returned open files so that only files opened from the specified client computer are returned.

エイリアス

なし

必須?

false

位置は?

4

既定値

なし

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

True (ByPropertyName)

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

false

-ClientUserName<String[]>

Specifies the name of the user whose open files will be retrieved.

エイリアス

なし

必須?

false

位置は?

5

既定値

なし

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

True (ByPropertyName)

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

false

-ClusterNodeName<String[]>

Specifies. in the case of a share hosted by a windows cluster, the name of the server which is hosting the open files being retrieved.

エイリアス

なし

必須?

false

位置は?

7

既定値

なし

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

True (ByPropertyName)

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

false

-FileId<UInt64[]>

Specifies the file identifier (ID) of the file for which the information is retrieved.

エイリアス

なし

必須?

false

位置は?

2

既定値

なし

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

True (ByPropertyName)

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

false

-IncludeHidden

Indicates that handles that are created and used internally will be enumerated as well.

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

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

false

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

false

-ScopeName<String[]>

Specifies the scope of the open files being retrieved.

エイリアス

なし

必須?

false

位置は?

6

既定値

なし

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

True (ByPropertyName)

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

false

-SessionId<UInt64[]>

Specifies a session ID. Only files that have been opened in the specified session are returned.

エイリアス

なし

必須?

false

位置は?

3

既定値

なし

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

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)。

入力

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

  • None

出力

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

  • Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/SMB/MSFT_SmbOpenFile

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

EXAMPLE 1

This example retrieves basic information about the files that are open on behalf of the clients of the SMB server.

PS C:\> Get-SMBOpenFile

EXAMPLE 2

This example retrieves all of information about the file identified as 4415226383569 that is open on behalf of the clients of the SMB server.

PS C:\> Get-SmbOpenFile -FileId 4415226383569 | Select-Object -Property *

EXAMPLE 3

This example retrieves basic information about the files that are open on behalf of the SMB client identified as 4415226380393of the SMB server.

PS C:\> Get-SmbOpenFile -SessionId 4415226380393

EXAMPLE 4

This example retrieves basic information about the files that are open on behalf of the SMB client of the SMB server named Contoso-SO.

PS C:\> Get-SmbOpenFile -ScopeName Contoso-SO

EXAMPLE 5

This example retrieves basic information about the files with the file extension of .VHDX that are open on behalf of the SMB client of the SMB server.

PS C:\> Get-SmbOpenFile | Where-Object -Property ShareRelativePath -Match ".VHDX"

関連トピック

Close-SmbOpenFile