Set-NfsNetgroup

Set-NfsNetgroup

Modifies a netgroup.

Syntax

Parameter Set: AllParameterSets
Set-NfsNetgroup [-NetGroupName] <String> [[-AddMember] <String[]> ] [[-RemoveMember] <String[]> ] [[-LdapServer] <String> ] [[-LdapNamingContext] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-NfsNetgroup cmdlet adds or removes netgroup members. You can specify a netgroup member by its host name or IP address.

You can modify netgroups that are stored in Active Directory Domain Services (AD DS) or Active Directory Lightweight Directory Services (AD LDS) only. To modify a netgroup that is stored in Network Information Service (NIS), use the corresponding NIS administration tool. For more information about how to manage an NIS server, see Server for NIS Administration.

Parameters

-AddMember<String[]>

Specifies an array of host names or IP addresses of client computers to add to a netgroup.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LdapNamingContext<String>

Specifies the Lightweight Directory Access Protocol (LDAP) naming context of a netgroup store.

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LdapServer<String>

Specifies an LDAP server name of a netgroup store.

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NetGroupName<String>

Specifies the name of a netgroup. This parameter is mandatory.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RemoveMember<String[]>

Specifies an array of host names or IP addresses of client computers to remove from a netgroup.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.FileServices.Powershell.Nfs.NetGroup

Examples

Example 1: Add a member to a netgroup

This command adds a member that is named APPServer-08 to a netgroup that is named AppServers, in a network store that is named Contoso.com.

PS C:\> Set-NfsNetgroup -LdapServer "Contoso.com" -NetGroupName "AppServers" -AddMember "APPServer-08"

Get-NfsNetgroup

New-NfsNetgroup

Remove-NfsNetgroup