Skip to content

VMHyperV: Added the ability to enable or disable the TPM on a VM#215

Open
jmerriweather wants to merge 4 commits into
dsccommunity:mainfrom
jmerriweather:enable-vm-tpm
Open

VMHyperV: Added the ability to enable or disable the TPM on a VM#215
jmerriweather wants to merge 4 commits into
dsccommunity:mainfrom
jmerriweather:enable-vm-tpm

Merge branch 'main' into enable-vm-tpm

e877c92
Select commit
Loading
Failed to load commit list.
Azure Pipelines / dsccommunity.HyperVDsc failed Nov 25, 2025 in 7m 1s

Build #4.0.0-PR0215.7 had test failures

Details

Tests

  • Failed: 7 (0.44%)
  • Passed: 1,567 (98.31%)
  • Other: 20 (1.25%)
  • Total: 1,594

Annotations

Check failure on line 1720 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.HyperVDsc

Build log #L1720

PowerShell exited with code '1'.

Check failure on line 1356 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.HyperVDsc

Build log #L1356

PowerShell exited with code '1'.

Check failure on line 1 in Common Tests - PS Script Analyzer on Resource Files.DSC_VMHyperV.psm1.Should pass all custom DSC Resource Kit PSSA rules

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.HyperVDsc

Common Tests - PS Script Analyzer on Resource Files.DSC_VMHyperV.psm1.Should pass all custom DSC Resource Kit PSSA rules

Expected an empty collection, because Error-level Rule(s) triggered.

 
RuleName            Severity ScriptName        Line Message                                                   
--------            -------- ----------        ---- -------                                                   
Measure-IfStatement  Warning DSC_VMHyperV.psm1  455 If-statements should not have the open brace on the same  
                                                    line as the statement. See https://github.com/PowerShell/D
                                                    scResources/blob/master/StyleGuidelines.md#one-newline-bef
                                                    ore-braces                                                
Measure-IfStatement  Warning DSC_VMHyperV.psm1  641 If-statements should not have the open brace on the same  
                                                    line as the statement. See https://github.com/PowerShell/D
                                                    scResources/blob/master/StyleGuidelines.md#one-newline-bef
                                                    ore-braces, but got collection with size 2 @(If-statements should not have the open brace on the same line as the statement. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#one-newline-before-braces, If-statements should not have the open brace on the same line as the statement. See https://github.com/PowerShell/DscResources/blob/master/StyleGuidelines.md#one-newline-before-braces).
Raw output
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\DscResource.Test\0.18.0\Tests\QA\PSSAResource.common.v4.Tests.ps1: line 148
148:                 $DSCCustomRulesOutput | Should -HaveCount 0 -Because "Error-level Rule(s) triggered.`r`n`r`n $report`r`n"

Check failure on line 1 in xVMHyper-V.Validates Get-TargetResource Method.Calls Get-VMFirmware if a generation 2 VM

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.HyperVDsc

xVMHyper-V.Validates Get-TargetResource Method.Calls Get-VMFirmware if a generation 2 VM

Get-VMSecurity: StubNotImplemented
Raw output
at <ScriptBlock>, D:\a\1\s\tests\Unit\Stubs\Hyper-V.stubs.psm1: line 9501
9501:         throw '{0}: StubNotImplemented' -f $MyInvocation.MyCommand

Check failure on line 1 in xVMHyper-V.Validates Test-TargetResource Method.Returns $true when TpmEnabled is disabled and requested "TpmEnabled" = "$true"

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.HyperVDsc

xVMHyper-V.Validates Test-TargetResource Method.Returns $true when TpmEnabled is disabled and requested "TpmEnabled" = "$true"

Could not find Command Test-VMSecurity
Raw output
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\4.10.1\Functions\Mock.ps1: line 914
914:         throw ([System.Management.Automation.CommandNotFoundException] "Could not find Command $commandName")

Check failure on line 1 in xVMHyper-V.Validates Test-TargetResource Method.Returns $false when TpmEnabled is disabled and requested "TpmEnabled" = "$false"

See this annotation in the file changed.

@azure-pipelines azure-pipelines / dsccommunity.HyperVDsc

xVMHyper-V.Validates Test-TargetResource Method.Returns $false when TpmEnabled is disabled and requested "TpmEnabled" = "$false"

Could not find Command Test-VMSecurity
Raw output
at <ScriptBlock>, D:\a\1\s\output\RequiredModules\Pester\4.10.1\Functions\Mock.ps1: line 914
914:         throw ([System.Management.Automation.CommandNotFoundException] "Could not find Command $commandName")