< Back
Set-NfNfsShare
Post
NAME Set-NfNfsShare
SYNOPSIS
Sets the options for an NFS share
SYNTAX
Set-NfNfsShare [-Path] <String> [-SecurityModes <String[]>] [-Root <String[]>] [-ReadWrite <String[]>] [-ReadOnly
<String[]>] [-NoAccess <String[]>] [-Anonymous <String>] [-RootMap <String>] [-NoHide] [-Recursive] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION
Sets the options for an NFS share
PARAMETERS
-Path <String>
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-SecurityModes <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Root <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ReadWrite <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ReadOnly <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-NoAccess <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Anonymous <String>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-RootMap <String>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-NoHide [<SwitchParameter>]
Invoke to disable explicit mapping requirements for the client
Required? false
Position? named
Default value False
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Recursive [<SwitchParameter>]
Invoke to apply share properties to nested folders
Required? false
Position? named
Default value False
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Share object if updated
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$acl = ConvertFrom-NfsSecurityContexts (Get-NfsShare p1/top5).securityContexts.readWriteList
PS C:\\> $acl
192.168.0.1
@192.168.1.0/24
ahost.local
PS C:\\> $acl += "192.168.0.2"
PS C:\\> Set-NfsShare -Path p1/top5 -ReadWrite $acl
anon : -1
filesystem : p1/top5
mountPoint : /p1/top5
nohide : False
securityContexts : {@{readWriteList=System.Object[]; root=System.Object[]; none=System.Object[];
securityModes=System.Object[]}}
shareState : online
PS C:\\> ConvertFrom-NfsSecurityContexts (Get-NfsShare p1/top5).securityContexts.readWriteList
192.168.0.1
@192.168.1.0/24
ahost.local
192.168.0.2
Get an existing acl entry, add an new entry, then set the new acl on the nfs share
RELATED LINKS
SYNOPSIS
Sets the options for an NFS share
SYNTAX
Set-NfNfsShare [-Path] <String> [-SecurityModes <String[]>] [-Root <String[]>] [-ReadWrite <String[]>] [-ReadOnly
<String[]>] [-NoAccess <String[]>] [-Anonymous <String>] [-RootMap <String>] [-NoHide] [-Recursive] [-WhatIf]
[-Confirm] [<CommonParameters>]
DESCRIPTION
Sets the options for an NFS share
PARAMETERS
-Path <String>
Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-SecurityModes <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Root <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ReadWrite <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-ReadOnly <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-NoAccess <String[]>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Anonymous <String>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-RootMap <String>
Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-NoHide [<SwitchParameter>]
Invoke to disable explicit mapping requirements for the client
Required? false
Position? named
Default value False
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-Recursive [<SwitchParameter>]
Invoke to apply share properties to nested folders
Required? false
Position? named
Default value False
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Share object if updated
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$acl = ConvertFrom-NfsSecurityContexts (Get-NfsShare p1/top5).securityContexts.readWriteList
PS C:\\> $acl
192.168.0.1
@192.168.1.0/24
ahost.local
PS C:\\> $acl += "192.168.0.2"
PS C:\\> Set-NfsShare -Path p1/top5 -ReadWrite $acl
anon : -1
filesystem : p1/top5
mountPoint : /p1/top5
nohide : False
securityContexts : {@{readWriteList=System.Object[]; root=System.Object[]; none=System.Object[];
securityModes=System.Object[]}}
shareState : online
PS C:\\> ConvertFrom-NfsSecurityContexts (Get-NfsShare p1/top5).securityContexts.readWriteList
192.168.0.1
@192.168.1.0/24
ahost.local
192.168.0.2
Get an existing acl entry, add an new entry, then set the new acl on the nfs share
RELATED LINKS