Set-NfsNetgroup
Modifies a netgroup.
Syntax
Default (Default)
Set-NfsNetgroup
[-NetGroupName] <String>
[[-AddMember] <String[]>]
[[-RemoveMember] <String[]>]
[[-LdapServer] <String>]
[[-LdapNamingContext] <String>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
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.
Examples
Example 1: Add a member to a netgroup
PS C:\> Set-NfsNetgroup -LdapServer "Contoso.com" -NetGroupName "AppServers" -AddMember "APPServer-08"
NetgroupName : AppServers
NetgroupNamingContext : CN=mappedidentity,DC=Contoso,DC=com
NetgroupMembers : {appserver-08, appserver-07}
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.
Parameters
-AddMember
Specifies an array of host names or IP addresses of client computers to add to a netgroup.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | add |
Parameter sets
(All)
Position: | 1 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-LdapNamingContext
Specifies the Lightweight Directory Access Protocol (LDAP) naming context of a netgroup store.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | dn |
Parameter sets
(All)
Position: | 4 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-LdapServer
Specifies an LDAP server name of a netgroup store.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ldap |
Parameter sets
(All)
Position: | 3 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-NetGroupName
Specifies the name of a netgroup. This parameter is mandatory.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | name, ngname |
Parameter sets
(All)
Position: | 0 |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-RemoveMember
Specifies an array of host names or IP addresses of client computers to remove from a netgroup.
Parameter properties
Type: | String[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | remove |
Parameter sets
(All)
Position: | 2 |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | True |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.