PowerShell を管理者権限で起動(Windows Server 2019)

PowerShell を管理者権限で起動

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\administrator> mkdir c:\nfs-share

ディレクトリ: C:\

Mode LastWriteTime Length Name
—- ————- —— —-
d—– 2019/XX/XX 13:37 nfs-share

PS C:\Users\administrator> new-nfsshare -name “nfs-share” `
>> -path “c:\nfs-share” `
>> -enableunmappedaccess $true `
>> -authentication Sys

Name Availability Path
—- ———— —-
nfs-share Standard (not clustered) c:\nfs-share

PS C:\Users\administrator> Grant-NfsSharePermission -Name “nfs-share” `
>> -ClientName “192.168.x.xx” `
>> -ClientType “host” `
>> -Permission “readwrite” `
>> -AllowRootAccess $True
PS C:\Users\administrator> Get-NfsShare -Name “nfs-share”

Name Availability Path
—- ———— —-
nfs-share Standard (not clustered) c:\nfs-share

PS C:\Users\administrator> Get-NfsSharePermission -Name “nfs-share”

Name ClientName Permission AllowRootAccess
—- ———- ———- —————
nfs-share 192.168.x.xx READ, WRITE True
nfs-share All Machines DENY ACCESS False

PS C:\Users\administrator>