Skip to content

Commit

Permalink
Corrected named parameters and object type cases per styleguide.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Nothhard committed Jun 24, 2020
1 parent 19e2854 commit 0a57d1f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions Misc/xBitlockerCommon.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -794,34 +794,34 @@ function Assert-HasPrereqsForBitlocker
if ($blFeature.State -ne 'Enabled')
{
$hasAllPreReqs = $false
Write-Error 'The Bitlocker feature needs to be installed before the xBitlocker module can be used'
Write-Error -Message 'The Bitlocker feature needs to be installed before the xBitlocker module can be used'
}
}
else
{
$blFeature = Get-WindowsFeature BitLocker
$blAdminToolsFeature = Get-WindowsFeature RSAT-Feature-Tools-BitLocker
$blAdminToolsRemoteFeature = Get-WindowsFeature RSAT-Feature-Tools-BitLocker-RemoteAdminTool
$blFeature = Get-WindowsFeature -Name 'BitLocker'
$blAdminToolsFeature = Get-WindowsFeature -Name 'RSAT-Feature-Tools-BitLocker'
$blAdminToolsRemoteFeature = Get-WindowsFeature -Name 'RSAT-Feature-Tools-BitLocker-RemoteAdminTool'

if ($blFeature.InstallState -ne 'Installed')
{
$hasAllPreReqs = $false

Write-Error 'The Bitlocker feature needs to be installed before the xBitlocker module can be used'
Write-Error -Message 'The Bitlocker feature needs to be installed before the xBitlocker module can be used'
}

if ($blAdminToolsFeature.InstallState -ne 'Installed')
{
$hasAllPreReqs = $false

Write-Error 'The RSAT-Feature-Tools-BitLocker feature needs to be installed before the xBitlocker module can be used'
Write-Error -Message 'The RSAT-Feature-Tools-BitLocker feature needs to be installed before the xBitlocker module can be used'
}

if ($blAdminToolsRemoteFeature.InstallState -ne 'Installed' -and (Get-OSEdition) -notmatch 'Core')
{
$hasAllPreReqs = $false

Write-Error 'The RSAT-Feature-Tools-BitLocker-RemoteAdminTool feature needs to be installed before the xBitlocker module can be used'
Write-Error -Message 'The RSAT-Feature-Tools-BitLocker-RemoteAdminTool feature needs to be installed before the xBitlocker module can be used'
}

}
Expand Down
10 changes: 5 additions & 5 deletions Tests/Unit/xBitlockerCommon.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ try
{
param
(
[string]
[String]
$FeatureName
)
}
Expand All @@ -230,7 +230,7 @@ try
{
param
(
[string]
[String]
$FeatureName
)
}
Expand Down Expand Up @@ -309,9 +309,9 @@ try
Mock -CommandName Get-WindowsOptionalFeature -MockWith {
param
(
[switch]
$online = $false,
[string]
[Switch]
$Online = $false,
[String]
$FeatureName
)

Expand Down

0 comments on commit 0a57d1f

Please sign in to comment.