Set-NfsMappedIdentity

Set-NfsMappedIdentity

Modifies a mapped identity.

Syntax

Parameter Set: User
Set-NfsMappedIdentity -NfsServer <String> -NfsServerPassword <SecureString> -NfsServerUser <String> -UserName <String> [-GroupIdentifier <Int32> ] [-UserIdentifier <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: AllParameterSets
Set-NfsMappedIdentity [-LdapNamingContext <String> ] [-MappingStore <MappingStoreType> {Ad | Ldap | Mapfiles} ] [-NfsServer <String> ] [-NfsServerPassword <SecureString> ] [-NfsServerUser <String> ] [-Server <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: Group
Set-NfsMappedIdentity -GroupIdentifier <Int32> -GroupName <String> -NfsServer <String> -NfsServerPassword <SecureString> -NfsServerUser <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-NfsMappedIdentity cmdlet modifies a mapped identity that is stored in the Network File System (NFS) server mapping store. The cmdlet also updates the group membership of the Windows user account to match its assigned group identifier (GID).

Parameters

-GroupIdentifier<Int32>

Specifies the group identifier of a mapped identity.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-GroupName<String>

Specifies the SAMAccountName of a Windows group account.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-LdapNamingContext<String>

Specifies the Lightweight Directory Access Protocol (LDAP) naming context (directory partition) of an NFS identity mapping store. You can use this parameter to search for mapped identities in the specified naming context.

Aliases

none

Required?

false

Position?

named

Default Value

DefaultNamingContext

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MappingStore<MappingStoreType>

Specifies the type of identity mapping store in which the Set-NfsMappedIdentity cmdlet updates a mapped identity. When this parameter is not specified, the Set-NfsMappedIdentity cmdlet gets the store configuration settings from the NFS server. Valid values are AD and LDAP.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Server<String>

Specifies the LDAP server name of a store that NFS server uses. This can be a domain name, Active Directory Lightweight Directory Services (AD LDS) server name, or LDAP server name. When this parameter is not specified, the cmdlet tries to connect to either the LDAP store on the local computer at port 389 when MappingStore is LDAP, or the Active Directory domain of the computer when MappingStore is Active Directory.

Aliases

none

Required?

false

Position?

named

Default Value

localhost:389

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserIdentifier<Int32>

Specifies a UID to assign to a user account that the UserName parameter specifies.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UserName<String>

Specifies the SAMAccountName of a user account.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NfsServer<String>

Specifies the name of the NFS server where the Windows user account is to be created, when the mapped identity store is Ldap.

This parameter is only applicable when the value of the MappingStore parameter is set to Ldap.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NfsServerUser<String>

Specifies the user name to use to authenticate against the NFS server specified by the NfsServer parameter.

This parameter is only applicable when the value of the MappingStore parameter is set to Ldap.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-NfsServerPassword<SecureString>

Specifies the password to use to authenticate against the NFS server specified by the NfsServer parameter.

This parameter is only applicable when the value of the MappingStore parameter is set to Ldap.

Aliases

none

Required?

true

Position?

named

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.

  • Nothing

Examples

Example 1: Modify a mapped identity that is stored in an AD LDS instance

This command modifies a mapped identity that is stored in a configured AD LDS instance and that corresponds to the Windows group account Administrators. The command resets the associated group identifier to 600.

PS C:\> Set-NfsMappedIdentity -MappingStore "LDAP" -GroupName "Administrators" -GroupIdentifier 600

Example 2: Modify a mapped identity that is stored in an Active Directory domain

This command modifies a mapped identity that is stored in a specified Active Directory domain and that corresponds to the user account JCool. The command sets the user identifier to 501 and the group identifier to 600, and it updates the group membership of the user account JCool to make it a member of a group account that has GID 600.

PS C:\> Set-NfsMappedIdentity -Store "AD" –Server "Contoso"-UserName "JCool" -UserIdentifier 501 -GroupIdentifier 600

Example 3: Modify a mapped identity that is stored in a configured LDAP store

This command modifies a mapped identity that is stored in the LDAP store on a specified server that is named MyLdapServer and that corresponds to the user account Contoso\JCool. It sets the user identifier to 501 and the group identifier to 600. The command also adds the user account JCool to GID 600.

PS C:\> Set-NfsMappedIdentity -Store "LDAP" -UserName "JCool" -UserIdentifier 501 -GroupIdentifier 600 -Server "MyLdapServer:389" -LdapNamingContext "CN=NFS,DC=NFS"

Get-NfsMappedIdentity

New-NfsMappedIdentity

Remove-NfsMappedIdentity

Resolve-NfsMappedIdentity

Test-NfsMappedIdentity

Get-NfsMappingStore

Install-NfsMappingStore

Set-NfsMappingStore

Test-NfsMappingStore