Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ For older change log history see the [historic changelog](HISTORIC_CHANGELOG.md)
- Fixed VMName property in example.
- xVMNetworkAdapter
- Fixed MacAddress sample data.
- Fixed Get-TargetResource failing for a ManagementOS adapter while trying
to obtain guest IP settings.
- xVMSwitch
- Correctly return the state as `$true` or `$false` depending on the
`Ensure` property when the switch does not exist.
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ function Get-TargetResource
{
$configuration.Add('MacAddress', $netAdapter.MacAddress)
$configuration.Add('DynamicMacAddress', $netAdapter.DynamicMacAddressEnabled)
}

$networkInfo = Get-NetworkInformation -VMName $VMName -Name $Name
if ($networkInfo)
{
$item = New-CimInstance -ClassName MSFT_xNetworkSettings -Property $networkInfo -Namespace root/microsoft/windows/desiredstateconfiguration -ClientOnly
$configuration.Add('NetworkSetting', $item)
$networkInfo = Get-NetworkInformation -VMName $VMName -Name $Name
if ($networkInfo)
{
$item = New-CimInstance -ClassName MSFT_xNetworkSettings -Property $networkInfo -Namespace root/microsoft/windows/desiredstateconfiguration -ClientOnly
$configuration.Add('NetworkSetting', $item)
}
}

$configuration.Add('Ensure', 'Present')
Expand Down