Skip to content

Commit f13f327

Browse files
committed
Powershell: remove Enable-Hyper-V function
This function no longer appears to be used within the windows stemcell repositoires. This was likely needed for versions of Windows older than the one currently being built (windows-2019).
1 parent 2e87f5c commit f13f327

File tree

3 files changed

+1
-23
lines changed

3 files changed

+1
-23
lines changed

modules/BOSH.Utils/BOSH.Utils.Tests.ps1

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -497,20 +497,4 @@ Describe "BOSH.Utils" {
497497
{ New-VersionFile } | Should -Throw '-Version parameter must be specified as major.minor`[.whatever`]'
498498
}
499499
}
500-
501-
Describe "Enable-Hyper-V" {
502-
503-
AfterEach {
504-
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -norestart
505-
}
506-
507-
It "Enables Hyper V" {
508-
getWindowsOptionalFeatureState("Microsoft-Hyper-V") | Should -MatchExactly "Disabled"
509-
510-
Enable-Hyper-V
511-
512-
getWindowsOptionalFeatureState("Microsoft-Hyper-V") | Should -MatchExactly "Enabled"
513-
}
514-
515-
}
516500
}

modules/BOSH.Utils/BOSH.Utils.psd1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@
2626
'Get-OSVersionString',
2727
'Get-WinRMConfig',
2828
'Get-WUCerts',
29-
'New-VersionFile',
30-
'Enable-Hyper-V'
29+
'New-VersionFile'
3130
)
3231
CmdletsToExport = @()
3332
VariablesToExport = '*'

modules/BOSH.Utils/BOSH.Utils.psm1

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,3 @@ function Invoke-Remove-Item
436436
)
437437
Remove-Item -path $path
438438
}
439-
440-
function Enable-Hyper-V
441-
{
442-
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -norestart
443-
}

0 commit comments

Comments
 (0)