New-NfsUser

This cmdlet creates an NFS user account on the specified virtual machine host. The credentials of the newly created NFS user account are used by the NFS v4.1 for Kerberos authentication. If an NFS user account already exists on the virtual machine host, this cmdlet overwrites that NFS user account. The virtual machine host must be part of an Active Directory domain for the cmdlet to run successfully.

Syntax

-VMHost  <VMHost>
[[-Password]  <SecureString>]
[-Credential  <PSCredential>]
[-Force]
[-Name  <String>]
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
VMHost
VMHost named
  • wildcards
  • pipeline
  • Specifies the virtual machine host to which you want to add the NFS user account.
    optional
    Password
    SecureString 1 Specifies password for authentication. This parameter accepts both secure and plain strings.
    optional
    Credential
    PSCredential named Specifies a PSCredential object for the Kerberos authentication.
    optional
    Force
    SwitchParameter named By default, the cmdlet fails to create an NFS user account if an NFS user account with the same user name already exists on the virtual machine host. If the Force parameter is specified, the cmdlet overwrites the existing NFS user account.
    optional
    Name
    String named Specifies the NFS user name that you want to use for the Kerberos authentication.
    optional
    Server
    VIServer[] named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet.

    Output

    VMware.VimAutomation.Storage.Types.V1.Nfs.NfsUser

    Examples


    Example 1

    New-NfsUser -VMHost $vmhost -Username "user1" -Password "password1"

    Creates the "user1" NFS user account on the $vmhost virtual machine host and sets the password to "password1".

    Example 2

    New-NfsUser -VMHost $vmhost -Credential $myCredentialsObject

    Creates an NFS user account by using a credential object.

    Related Commands

    Feedback

    Was this page helpful?