Set-SmbPathAcl

Set-SmbPathAcl

Sets the ACL for the file system folder to match the ACL used by an SMB share.

構文

Parameter Set: Default
Set-SmbPathAcl [-ShareName] <String> [[-ScopeName] <String> ] [ <CommonParameters>]

詳細説明

The Set-SmbPathAcl cmdlet sets the access control list (ACL) for the file system folder to match the ACL for the server message block (SMB) share. The cmdlet sets the ACL to match the SMB share itself. This action simplifies the configuration of NTFS or ReFS file system permissions by copying the SMB share permissions.

パラメーター

-ScopeName<String>

Specifies the scope name of the SMB share. The cmdlet sets the ACL for the scope that you specify.

エイリアス

なし

必須?

false

位置は?

2

既定値

なし

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

false

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

false

-ShareName<String>

Specifies the name of the SMB share. The cmdlet sets the ACL on the file system folder to the ACL used by the SMB share that you specify.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

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

false

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

false

<CommonParameters>

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

入力

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

出力

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

  • The previous syntax for the same task, ((Get-SmbShare –Name <ShareName> ).PresetPathACL | Set-Acl), continues to work with newer versions of the Windows Server operating system, but the new syntax is much simpler and therefore recommended.

Example 1: Set the SMB path ACL by share name

This command sets the ACL on the file system folder used by the Share01 share to match the ACL of the share.

PS C:\> Set-SmbPathAcl -ShareName "Share01"

Example 2: Set the SMB path ACL by share name and scope name

This command sets the ACL on the file system folder used by the Share01 share on the SOFS01 scope to match the ACL of the share.

PS C:\> Set-SmbPathAcl -ShareName "Share01" -ScopeName "SOFS01"