-
Notifications
You must be signed in to change notification settings - Fork 41
NfsUser
SimeonGerginov edited this page Jan 20, 2020
·
1 revision
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Server | Key | string | The name of the Server we are trying to connect to. The Server can be a vCenter or ESXi. | |
Credential | Mandatory | PSCredential | The credentials needed for connection to the specified Server. | |
VMHostName | Key | string | The name of the VMHost which is going to be used. | |
Name | Key | string | The Nfs User name used for Kerberos authentication. | |
Password | Optional | string | The Nfs User password used for Kerberos authentication. | |
Ensure | Mandatory | Ensure | Specifies whether the Nfs User should be present or absent. | Present, Absent |
Force | Optional | bool | Specifies whether to change the password of the Nfs User. When the property is not specified or is $false, it is ignored. If the property is $true and the Nfs User exists, the password of the Nfs User is changed. |
The resource is used to create, change the password and remove Nfs Users on the specified VMHost. The VMHost must be in Active Directory domain.
Creates Nfs User MyNfsUser with password MyNfsUserPassword1! on the specified VMHost. The VMHost must be in Active Directory domain for the Nfs User to be created.
Configuration NfsUser_CreateNfsUser_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$VMHostName
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
NfsUser NfsUser {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyNfsUser'
Password = 'MyNfsUserPassword1!'
Ensure = 'Present'
}
}
}
Changes the password of Nfs User MyNfsUser to MyNfsUserPassword2! on the specified VMHost.
Configuration NfsUser_ChangeNfsUserPassword_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$VMHostName
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
NfsUser NfsUser {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyNfsUser'
Password = 'MyNfsUserPassword2!'
Ensure = 'Present'
Force = $true
}
}
}
Removes Nfs User MyNfsUser from the specified VMHost.
Configuration NfsUser_RemoveNfsUser_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$VMHostName
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
NfsUser NfsUser {
Server = $Server
Credential = $Credential
VMHostName = $VMHostName
Name = 'MyNfsUser'
Ensure = 'Absent'
}
}
}
- Home
- Tips & Tricks
- Cluster
- DRSRule
- Datacenter
- DatacenterFolder
- DatastoreCluster
- DatastoreClusterAddDatastore
- DrsCluster
- Folder
- HACluster
- NfsDatastore
- NfsUser
- PowerCLISettings
- StandardPortGroup
- StandardSwitch
- VDPortGroup
- VDSwitch
- VDSwitchVMHost
- VMHostAcceptanceLevel
- VMHostAccount
- VMHostAdvancedSettings
- VMHostAgentVM
- VMHostAuthentication
- VMHostCache
- VMHostConfiguration
- VMHostDCUIKeyboard
- VMHostDnsSettings
- VMHostFirewallRuleset
- VMHostGraphics
- VMHostGraphicsDevice
- VMHostIPRoute
- VMHostIScsiHba
- VMHostIScsiHbaTarget
- VMHostIScsiHbaVMKernelNic
- VMHostNetworkCoreDump
- VMHostNtpSettings
- VMHostPciPassthrough
- VMHostPermission
- VMHostPhysicalNic
- VMHostPowerPolicy
- VMHostRole
- VMHostSNMPAgent
- VMHostSatpClaimRule
- VMHostScsiLun
- VMHostScsiLunPath
- VMHostService
- VMHostSettings
- VMHostSharedSwapSpace
- VMHostSoftwareDevice
- VMHostStorage
- VMHostSyslog
- VMHostTpsSettings
- VMHostVDSwitchMigration
- VMHostVMKernelActiveDumpFile
- VMHostVMKernelActiveDumpPartition
- VMHostVMKernelDumpFile
- VMHostVMKernelModule
- VMHostVdsNic
- VMHostVss
- VMHostVssBridge
- VMHostVssMigration
- VMHostVssNic
- VMHostVssPortGroup
- VMHostVssPortGroupSecurity
- VMHostVssPortGroupShaping
- VMHostVssPortGroupTeaming
- VMHostVssSecurity
- VMHostVssShaping
- VMHostVssTeaming
- VMHostvSANNetworkConfiguration
- VmfsDatastore
- vCenterSettings
- vCenterStatistics
- vCenterVMHost