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

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.