## PowerCLI Reference

# New-NfsUser

## Synopsis

This cmdlet creates an NFS user account on the specified virtual machine host.

Syntax

New-NfsUser [[-Username] <String>] [[-Password] <SecureString>] -VMHost <VMHost> [-Force] [-Credential <PSCredential>] [-Server <VIServer[]>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-NfsUser
Remove-NfsUser
Set-NfsUser

Detailed Description

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 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.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Username | String | Specifies the NFS user name to be used for Kerberos authentication. | false | false
Password | SecureString | Specifies password for authentication. This parameter accepts both secure and plain strings. | false | false
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation. | false | false
Credential | PSCredential | Specifies a PSCredential object for Kerberos authentication. | false | false
Force | SwitchParameter | 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 Force is specified, the cmdlet overwrites the existing NFS user account. | false | false
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | false | false
VMHost | VMHost | Specifies the virtual machine host on which you want to add the NFS user account. | true | true (ByValue)
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | false

Return Type

The newly created NfsUser object

Notes

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.

Copyright © VMware, Inc. All rights reserved.