Skip to content

Commit

Permalink
Changed .ToString to Out-String to prevent exceptions on null objects
Browse files Browse the repository at this point in the history
  • Loading branch information
merill committed Apr 16, 2024
1 parent 87ddebc commit 0895315
Show file tree
Hide file tree
Showing 44 changed files with 44 additions and 44 deletions.
2 changes: 1 addition & 1 deletion powershell/public/eidsca/@templateps1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function %PSFunctionName% {

$result = Invoke-MtGraphRequest -RelativeUri "%RelativeUri%" -ApiVersion %ApiVersion%

$tenantValue = ($result.%CurrentValue%).ToString()
$tenantValue = $result.%CurrentValue% | Out-String -NoNewLine
$testResult = $tenantValue -eq %RecommendedValue%

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAF01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAF01 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta

$tenantValue = ($result.state).ToString()
$tenantValue = $result.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAF02.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAF02 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta

$tenantValue = ($result.isSelfServiceRegistrationAllowed).ToString()
$tenantValue = $result.isSelfServiceRegistrationAllowed | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAF03.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAF03 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta

$tenantValue = ($result.isAttestationEnforced).ToString()
$tenantValue = $result.isAttestationEnforced | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAF04.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAF04 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta

$tenantValue = ($result.keyRestrictions.isEnforced).ToString()
$tenantValue = $result.keyRestrictions.isEnforced | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAF05.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAF05 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta

$tenantValue = ($result.keyRestrictions.aaGuids -notcontains $null).ToString()
$tenantValue = $result.keyRestrictions.aaGuids -notcontains $null | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAF06.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAF06 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta

$tenantValue = ($result.keyRestrictions.aaGuids -notcontains $null -and ($result.keyRestrictions.enforcementType -eq 'allow' -or $result.keyRestrictions.enforcementType -eq 'block')).ToString()
$tenantValue = $result.keyRestrictions.aaGuids -notcontains $null -and ($result.keyRestrictions.enforcementType -eq 'allow' -or $result.keyRestrictions.enforcementType -eq 'block') | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAG01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAG01 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy" -ApiVersion beta

$tenantValue = ($result.policyMigrationState).ToString()
$tenantValue = $result.policyMigrationState | Out-String -NoNewLine
$testResult = $tenantValue -eq 'migrationComplete'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAG02.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAG02 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy" -ApiVersion beta

$tenantValue = ($result.reportSuspiciousActivitySettings.state).ToString()
$tenantValue = $result.reportSuspiciousActivitySettings.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAG03.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAG03 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy" -ApiVersion beta

$tenantValue = ($result.reportSuspiciousActivitySettings.includeTarget.id).ToString()
$tenantValue = $result.reportSuspiciousActivitySettings.includeTarget.id | Out-String -NoNewLine
$testResult = $tenantValue -eq 'all_users'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM01 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.state).ToString()
$tenantValue = $result.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM02.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM02 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.state).ToString()
$tenantValue = $result.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM03.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM03 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.featureSettings.numberMatchingRequiredState.state).ToString()
$tenantValue = $result.featureSettings.numberMatchingRequiredState.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM04.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM04 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.featureSettings.numberMatchingRequiredState.includeTarget.id).ToString()
$tenantValue = $result.featureSettings.numberMatchingRequiredState.includeTarget.id | Out-String -NoNewLine
$testResult = $tenantValue -eq 'all_users'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM06.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM06 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.featureSettings.displayAppInformationRequiredState.state).ToString()
$tenantValue = $result.featureSettings.displayAppInformationRequiredState.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM07.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM07 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.featureSettings.displayAppInformationRequiredState.includeTarget.id).ToString()
$tenantValue = $result.featureSettings.displayAppInformationRequiredState.includeTarget.id | Out-String -NoNewLine
$testResult = $tenantValue -eq 'all_users'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM09.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM09 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.featureSettings.displayLocationInformationRequiredState.state).ToString()
$tenantValue = $result.featureSettings.displayLocationInformationRequiredState.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAM10.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAM10 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta

$tenantValue = ($result.featureSettings.displayLocationInformationRequiredState.includeTarget.id).ToString()
$tenantValue = $result.featureSettings.displayLocationInformationRequiredState.includeTarget.id | Out-String -NoNewLine
$testResult = $tenantValue -eq 'all_users'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP01 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.allowedToUseSSPR).ToString()
$tenantValue = $result.allowedToUseSSPR | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP04.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP04 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.allowInvitesFrom).ToString()
$tenantValue = $result.allowInvitesFrom | Out-String -NoNewLine
$testResult = $tenantValue -eq 'adminsAndGuestInviters'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP05.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP05 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.allowedToSignUpEmailBasedSubscriptions).ToString()
$tenantValue = $result.allowedToSignUpEmailBasedSubscriptions | Out-String -NoNewLine
$testResult = $tenantValue -eq 'false'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP06.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP06 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.allowEmailVerifiedUsersToJoinOrganization).ToString()
$tenantValue = $result.allowEmailVerifiedUsersToJoinOrganization | Out-String -NoNewLine
$testResult = $tenantValue -eq 'false'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP07.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP07 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.guestUserRoleId).ToString()
$tenantValue = $result.guestUserRoleId | Out-String -NoNewLine
$testResult = $tenantValue -eq '2af84b1e-32c8-42b7-82bc-daa82404023b'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP08.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP08 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.permissionGrantPolicyIdsAssignedToDefaultUserRole | Sort-Object -Descending | select-object -first 1).ToString()
$tenantValue = $result.permissionGrantPolicyIdsAssignedToDefaultUserRole | Sort-Object -Descending | select-object -first 1 | Out-String -NoNewLine
$testResult = $tenantValue -eq 'ManagePermissionGrantsForSelf.microsoft-user-default-low'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP09.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP09 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.allowUserConsentForRiskyApps).ToString()
$tenantValue = $result.allowUserConsentForRiskyApps | Out-String -NoNewLine
$testResult = $tenantValue -eq 'false'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP10.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP10 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.defaultUserRolePermissions.allowedToCreateApps).ToString()
$tenantValue = $result.defaultUserRolePermissions.allowedToCreateApps | Out-String -NoNewLine
$testResult = $tenantValue -eq 'false'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAP14.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAP14 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta

$tenantValue = ($result.defaultUserRolePermissions.allowedToReadOtherUsers).ToString()
$tenantValue = $result.defaultUserRolePermissions.allowedToReadOtherUsers | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAT01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAT01 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('TemporaryAccessPass')" -ApiVersion beta

$tenantValue = ($result.state).ToString()
$tenantValue = $result.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'enabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAT02.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAT02 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('TemporaryAccessPass')" -ApiVersion beta

$tenantValue = ($result.isUsableOnce).ToString()
$tenantValue = $result.isUsableOnce | Out-String -NoNewLine
$testResult = $tenantValue -eq 'false'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaAV01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaAV01 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Voice')" -ApiVersion beta

$tenantValue = ($result.state).ToString()
$tenantValue = $result.state | Out-String -NoNewLine
$testResult = $tenantValue -eq 'disabled'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaCP01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaCP01 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'EnableGroupSpecificConsent' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'EnableGroupSpecificConsent' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'False'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaCP03.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaCP03 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'BlockUserConsentForRiskyApps' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'BlockUserConsentForRiskyApps' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaCP04.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaCP04 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'EnableAdminConsentRequests' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'EnableAdminConsentRequests' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaCR01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaCR01 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta

$tenantValue = ($result.isEnabled).ToString()
$tenantValue = $result.isEnabled | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaCR02.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaCR02 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta

$tenantValue = ($result.notifyReviewers).ToString()
$tenantValue = $result.notifyReviewers | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaCR03.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaCR03 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta

$tenantValue = ($result.notifyReviewers).ToString()
$tenantValue = $result.notifyReviewers | Out-String -NoNewLine
$testResult = $tenantValue -eq 'true'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaCR04.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaCR04 {

$result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta

$tenantValue = ($result.requestDurationInDays).ToString()
$tenantValue = $result.requestDurationInDays | Out-String -NoNewLine
$testResult = $tenantValue -eq '30'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaPR01.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaPR01 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'BannedPasswordCheckOnPremisesMode' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'BannedPasswordCheckOnPremisesMode' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'Enforce'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaPR02.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaPR02 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'EnableBannedPasswordCheckOnPremises' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'EnableBannedPasswordCheckOnPremises' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'True'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaPR03.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaPR03 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'EnableBannedPasswordCheck' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'EnableBannedPasswordCheck' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'True'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaPR05.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaPR05 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'LockoutDurationInSeconds' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'LockoutDurationInSeconds' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq '60'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaPR06.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaPR06 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'LockoutThreshold' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'LockoutThreshold' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq '10'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaST08.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaST08 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'AllowGuestsToBeGroupOwner' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'AllowGuestsToBeGroupOwner' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'false'

if($testResult){
Expand Down
2 changes: 1 addition & 1 deletion powershell/public/eidsca/Test-MtEidscaST09.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Function Test-MtEidscaST09 {

$result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta

$tenantValue = ($result.values | where-object name -eq 'AllowGuestsToAccessGroups' | select-object -expand value).ToString()
$tenantValue = $result.values | where-object name -eq 'AllowGuestsToAccessGroups' | select-object -expand value | Out-String -NoNewLine
$testResult = $tenantValue -eq 'True'

if($testResult){
Expand Down

0 comments on commit 0895315

Please sign in to comment.