-
Notifications
You must be signed in to change notification settings - Fork 41
VMHostAgentVM
Parameter | Attribute | DataType | Description | Allowed Values |
---|---|---|---|---|
Server | Key | string | Name of the Server we are trying to connect to. The Server can only be a vCenter. | |
Name | Key | string | Name of the VMHost to configure. | |
Credential | Mandatory | PSCredential | Credentials needed for connection to the specified Server. | |
AgentVmDatastore | Optional | string | The Datastore used for deploying Agent VMs on this VMHost. | |
AgentVmNetwork | Optional | string | The Management Network used for Agent VMs on this VMHost. |
The resource is used to update the configuration of Agent Virtual Machine resources of the specified VMHost. If the AgentVm settings are not passed or set to $null, the values are cleared on the VMHost. The entire configuration is set each time since all values are overwritten.
Performs an Update operation on the configuration of Agent Virtual Machine resources of the specified VMHost by setting the Datastore and Network to $null. The behaviour will be the same if AgentVmDatastore and AgentVmNetwork are not passed at all here. So to clear the values both cases are valid - Not passing them at all or setting them to $null.
Configuration VMHostAgentVM_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Name,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
VMHostAgentVM VMHostAgentVM {
Name = $Name
Server = $Server
Credential = $Credential
AgentVmDatastore = $null
AgentVmNetwork = $null
}
}
}
Performs an Update operation on the configuration of Agent Virtual Machine resources of the specified VMHost by setting the Datastore to 'MyDatastore' and Network to $null.
Configuration VMHostAgentVM_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Name,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
VMHostAgentVM VMHostAgentVM {
Name = $Name
Server = $Server
Credential = $Credential
AgentVmDatastore = 'MyDatastore'
AgentVmNetwork = $null
}
}
}
Performs an Update operation on the configuration of Agent Virtual Machine resources of the specified VMHost by setting the Datastore to $null and Network to 'MyNetwork'.
Configuration VMHostAgentVM_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Name,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
VMHostAgentVM VMHostAgentVM {
Name = $Name
Server = $Server
Credential = $Credential
AgentVmDatastore = $null
AgentVmNetwork = 'MyNetwork'
}
}
}
Performs an Update operation on the configuration of Agent Virtual Machine resources of the specified VMHost by setting the Datastore to 'MyDatastore' and Network to 'MyNetwork'.
Configuration VMHostAgentVM_Config {
Param(
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Name,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[string]
$Server,
[Parameter(Mandatory = $true)]
[ValidateNotNullOrEmpty()]
[System.Management.Automation.PSCredential]
$Credential
)
Import-DscResource -ModuleName VMware.vSphereDSC
Node localhost {
VMHostAgentVM VMHostAgentVM {
Name = $Name
Server = $Server
Credential = $Credential
AgentVmDatastore = 'MyDatastore'
AgentVmNetwork = 'MyNetwork'
}
}
}
- 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