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>] [-Credential <PSCredential>] [-Force] [-Server <VIServer[]>] -VMHost <VMHost> [-Confirm] [-WhatIf] [<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

NameTypeDescriptionRequired?Pipeline InputDefault Value
UsernameStringSpecifies the NFS user name to be used for Kerberos authentication.falseFalse
PasswordSecureStringSpecifies password for authentication. This parameter accepts both secure and plain strings.falseFalse
ConfirmSwitchParameterIf 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.falseFalse
CredentialPSCredentialSpecifies a PSCredential object for Kerberos authentication.falseFalse
ForceSwitchParameterBy 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.falseFalse
ServerVIServer[]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.falseFalse
VMHostVMHostSpecifies the virtual machine host on which you want to add the NFS user account.trueTrue (ByValue)
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

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.