Skip to content

Commit

Permalink
Move to get-ciminstance from get-wmiobject
Browse files Browse the repository at this point in the history
  • Loading branch information
lmf-mx committed Feb 16, 2018
1 parent 32db09b commit b242ccb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions DockerMsftProvider.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ function InstallContainer
}
else
{
switch -regex (get-wmiobject -class win32_operatingsystem | select-object -ExpandProperty Caption ){
switch -regex (Get-CimInstance -ClassName Win32_OperatingSystem | select-object -ExpandProperty Caption ){
'Microsoft Windows 10' {
$containerExists = Get-WindowsOptionalFeature -Online -FeatureName Containers |
Select-object -Property *,@{name='Installed';expression={$_.State -eq 'Enabled'}}
Expand All @@ -599,7 +599,7 @@ function InstallContainer
else
{
Write-Verbose "Installing Containers..."
switch -regex (get-wmiobject -class win32_operatingsystem | select-object -ExpandProperty Caption ){
switch -regex (Get-CimInstance -ClassName Win32_OperatingSystem | select-object -ExpandProperty Caption ){
'Microsoft Windows 10' {$null = Enable-WindowsOptionalFeature -FeatureName Containers}
Default {$null = Install-WindowsFeature containers}
}
Expand All @@ -618,7 +618,7 @@ function UninstallContainer
}
else
{
switch -regex (get-wmiobject -class win32_operatingsystem | select-object -ExpandProperty Caption ){
switch -regex (Get-CimInstance -ClassName Win32_OperatingSystem | select-object -ExpandProperty Caption ){
'Microsoft Windows 10' {$null = Disable-WindowsOptionalFeature -FeatureName Containers}
Default {$null = Uninstall-WindowsFeature containers }
}
Expand Down

0 comments on commit b242ccb

Please sign in to comment.