Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
# NFS 共有用フォルダー作成
PS C:\Users\Administrator> mkdir C:\NFSshare
Directory: C:\
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 12/5/2024 4:42 PM NFSshare
# NFS 共有設定
PS C:\Users\Administrator> New-NfsShare -Name "NFSshare01" `
-Path "C:\NFSshare" `
-EnableUnmappedAccess $True `
-Authentication Sys
Name Availability Path
---- ------------ ----
NFSshare01 Standard (not clustered) C:\NFSshare
# 10.0.0.110 のホストに Read/Write のアクセス権を付与
PS C:\Users\Administrator> Grant-NfsSharePermission -Name "NFSshare01" `
-ClientName "10.0.0.110" `
-ClientType "host" `
-Permission "readwrite" `
-AllowRootAccess $True
# 確認
PS C:\Users\Administrator> Get-NfsShare -Name "NFSshare01"
Name Availability Path
---- ------------ ----
NFSshare01 Standard (not clustered) C:\NFSshare
PS C:\Users\Administrator> Get-NfsSharePermission -Name "NFSshare01"
Name ClientName Permission AllowRootAccess
---- ---------- ---------- ---------------
NFSshare01 10.0.0.110 READ, WRITE True
NFSshare01 All Machines DENY ACCESS False
|