MMCコンソールからだと「共有フォルダ」を開くと出てくるコンソールをPowershellでも操作できる
Powershellの場合
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
PS C:\Users\administrator.CHASE> Get-SmbShare Name ScopeName Path Description ---- --------- ---- ----------- ADMIN$ * C:\Windows Remote Admin C$ * C:\ Default share D$ * D:\ Default share E$ * E:\ Default share F$ * F:\ Default share G$ * G:\ Default share H$ * H:\ Default share IPC$ * Remote IPC J$ * J:\ Default share L$ * L:\ Default share MOVIE * H:\Backup\MOVIE thinkpadbackup * H:\thinkpadbackup PS C:\Users\administrator.CHASE> |
フォルダのアクセス許可の確認はGet-Acl
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
PS C:\Users\administrator.CHASE> Get-Acl -Path H:\thinkpadbackup\ ディレクトリ: H:\ Path Owner Access ---- ----- ------ thinkpadbackup BUILTIN\Administrators NT AUTHORITY\SYSTEM Allow FullControl... PS C:\Users\administrator.CHASE> (Get-Acl -Path H:\thinkpadbackup\).Access FileSystemRights : FullControl AccessControlType : Allow IdentityReference : NT AUTHORITY\SYSTEM IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropagationFlags : None FileSystemRights : FullControl AccessControlType : Allow IdentityReference : BUILTIN\Administrators IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropagationFlags : None FileSystemRights : FullControl AccessControlType : Allow IdentityReference : BUILTIN\Administrators IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropagationFlags : InheritOnly FileSystemRights : FullControl AccessControlType : Allow IdentityReference : CHASE\Administrator IsInherited : False InheritanceFlags : ContainerInherit, ObjectInherit PropagationFlags : None PS C:\Users\administrator.CHASE> |