From ff4a273b93eb96d2e71b9b10a32f85a01509d829 Mon Sep 17 00:00:00 2001 From: Fabian Bader Date: Sun, 21 Jul 2024 21:35:42 +0200 Subject: [PATCH] chore: Convert function declarations to lowercase --- build/eidsca/Update-EidscaTests.ps1 | 42 +++++++++---------- powershell/internal/Clear-ModuleVariable.ps1 | 2 +- .../internal/Get-GraphObjectMarkdown.ps1 | 2 +- .../Get-IsNewMaesterVersionAvailable.ps1 | 2 +- powershell/internal/Get-MtConfirmation.ps1 | 2 +- .../internal/Get-MtMaesterTestFolderPath.ps1 | 2 +- powershell/internal/Get-MtMarkdownReport.ps1 | 2 +- powershell/internal/Get-MtUserInteractive.ps1 | 2 +- .../internal/Invoke-MtGraphRequestCache.ps1 | 2 +- powershell/internal/Reset-MtProgressView.ps1 | 2 +- powershell/internal/Set-MtProgressView.ps1 | 2 +- powershell/internal/Update-MtMaesterTests.ps1 | 2 +- powershell/internal/Write-MtProgress.ps1 | 2 +- powershell/internal/eidsca/@templateps1.txt | 2 +- .../internal/eidsca/Test-MtEidscaAF01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAF02.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAF03.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAF04.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAF05.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAF06.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAG01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAG02.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAG03.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM02.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM03.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM04.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM06.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM07.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM09.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAM10.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP04.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP05.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP06.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP07.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP08.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP09.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP10.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAP14.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAT01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAT02.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaAV01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaCP01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaCP03.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaCP04.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaCR01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaCR02.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaCR03.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaCR04.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaPR01.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaPR02.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaPR03.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaPR05.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaPR06.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaST08.ps1 | 4 +- .../internal/eidsca/Test-MtEidscaST09.ps1 | 4 +- powershell/public/cisa/@templateps1.txt | 2 +- 58 files changed, 121 insertions(+), 121 deletions(-) diff --git a/build/eidsca/Update-EidscaTests.ps1 b/build/eidsca/Update-EidscaTests.ps1 index 991d42d1..7e046eb9 100644 --- a/build/eidsca/Update-EidscaTests.ps1 +++ b/build/eidsca/Update-EidscaTests.ps1 @@ -30,13 +30,13 @@ param ( [string] $AadSecConfigUrl = 'https://raw.githubusercontent.com/Cloud-Architekt/AzureAD-Attack-Defense/AADSCAv4/config/EidscaConfig.json' ) -Function GetRelativeUri($graphUri) { +function GetRelativeUri($graphUri) { $relativeUri = $graphUri -replace 'https://graph.microsoft.com/v1.0/', '' $relativeUri = $relativeUri -replace 'https://graph.microsoft.com/beta/', '' return $relativeUri } -Function GetVersion($graphUri) { +function GetVersion($graphUri) { $apiVersion = 'v1.0' if ($graphUri.Contains('beta')) { $apiVersion = 'beta' @@ -44,7 +44,7 @@ Function GetVersion($graphUri) { return $apiVersion } -Function GetRecommendedValue($RecommendedValue) { +function GetRecommendedValue($RecommendedValue) { if($RecommendedValue -notlike "@('*,*')") { $compareOperators = @(">=",">","<") foreach ($compareOperator in $compareOperators) { @@ -58,7 +58,7 @@ Function GetRecommendedValue($RecommendedValue) { } } -Function GetRecommendedValueMarkdown($RecommendedValueMarkdown) { +function GetRecommendedValueMarkdown($RecommendedValueMarkdown) { if($RecommendedValueMarkdown -like "@('*,*')") { $RecommendedValueMarkdown = $RecommendedValueMarkdown -replace "@\(", "" -replace "\)", "" return "$RecommendedValueMarkdown" @@ -67,7 +67,7 @@ Function GetRecommendedValueMarkdown($RecommendedValueMarkdown) { } } -Function GetCompareOperator($RecommendedValue) { +function GetCompareOperator($RecommendedValue) { if ($RecommendedValue -like "@('*,*')") { $compareOperator = [PSCustomObject]@{ name = 'in' @@ -108,7 +108,7 @@ Function GetCompareOperator($RecommendedValue) { return $compareOperator } -Function GetPageTitle($uri) { +function GetPageTitle($uri) { $isValidUri = ($uri -as [System.URI]).AbsoluteURI -ne $null $title = '' @@ -122,7 +122,7 @@ Function GetPageTitle($uri) { return $title } -Function GetPageMarkdownLink($uri) { +function GetPageMarkdownLink($uri) { $output = $uri $title = GetPageTitle($uri) @@ -133,12 +133,12 @@ Function GetPageMarkdownLink($uri) { return $output } -Function GetGraphExplorerMarkDownLink($relativeUri, $apiVersion) { +function GetGraphExplorerMarkDownLink($relativeUri, $apiVersion) { $graphExplorerUrl = "https://developer.microsoft.com/en-us/graph/graph-explorer?request=$relativeUri&method=GET&version=$apiVersion&GraphUrl=https://graph.microsoft.com" return "[Open in Graph Explorer]($graphExplorerUrl)" } -Function GetMitreUrl($item) { +function GetMitreUrl($item) { $item = $item.Trim() $urlPart = '' @@ -161,7 +161,7 @@ Function GetMitreUrl($item) { return $url } -Function GetMitreTitle($item) { +function GetMitreTitle($item) { $url = GetMitreUrl($item) if ($null -eq $url) { return $item @@ -174,7 +174,7 @@ Function GetMitreTitle($item) { return $title } -Function GetMitreItems($items) { +function GetMitreItems($items) { $output = "" $isFirst = $true foreach ($item in $items) { @@ -189,7 +189,7 @@ Function GetMitreItems($items) { return $output } -Function GetMitreMarkdownLink($item) { +function GetMitreMarkdownLink($item) { $url = GetMitreUrl($item) if ($null -eq $url) { return $item @@ -199,7 +199,7 @@ Function GetMitreMarkdownLink($item) { return $output } -Function GetMitreMarkdownLinks($items) { +function GetMitreMarkdownLinks($items) { $output = "" $isFirst = $true foreach ($item in $items) { @@ -212,7 +212,7 @@ Function GetMitreMarkdownLinks($items) { } return $output } -Function GetMitreDiagram($controlItem) { +function GetMitreDiagram($controlItem) { if ($controlItem.MitreTactic.Length -le 0) { return '' @@ -253,7 +253,7 @@ mindmap return $mermaid } -Function GetMarkdownLink($uri, $title, [switch]$lookupTitle) { +function GetMarkdownLink($uri, $title, [switch]$lookupTitle) { if([string]::IsNullOrEmpty($uri)) { return '' } if($lookupTitle) { $pageTitle = GetPageTitle($uri) @@ -264,7 +264,7 @@ Function GetMarkdownLink($uri, $title, [switch]$lookupTitle) { return "- [$title]($uri)" } -Function GetPortalDeepLinkMarkdown($portalDeepLink) { +function GetPortalDeepLinkMarkdown($portalDeepLink) { $result = $portalDeepLink if (![string]::IsNullOrEmpty($portalDeepLink)) { $domain = ($uri -as [System.URI]).Host @@ -279,7 +279,7 @@ Function GetPortalDeepLinkMarkdown($portalDeepLink) { return $result } -Function UpdateTemplate($template, $control, $controlItem, $docName, $isDoc) { +function UpdateTemplate($template, $control, $controlItem, $docName, $isDoc) { $relativeUri = GetRelativeUri($control.GraphUri) $apiVersion = GetVersion($control.GraphUri) @@ -361,23 +361,23 @@ Function UpdateTemplate($template, $control, $controlItem, $docName, $isDoc) { } # Returns the contents of a file named @template.txt at the given folder path -Function GetTemplate($folderPath, $templateFileName = "@template.txt") { +function GetTemplate($folderPath, $templateFileName = "@template.txt") { $templateFilePath = Join-Path $folderPath $templateFileName return Get-Content $templateFilePath -Raw } -Function CreateFile($folderPath, $fileName, $content) { +function CreateFile($folderPath, $fileName, $content) { $filePath = Join-Path $folderPath $fileName $content | Out-File $filePath -Encoding utf8 } -Function GetEidscaPsFunctionName($checkId) { +function GetEidscaPsFunctionName($checkId) { $powerShellFunctionName = "Test-Mt$($checkId)" $powerShellFunctionName = $powerShellFunctionName.Replace("EIDSCA.", "Eidsca") return $powerShellFunctionName } -Function GeneratePublicFunction($folderPath, $controlIds) { +function GeneratePublicFunction($folderPath, $controlIds) { $output = GetTemplate -folderPath $folderPath -templateFileName '@Test-MtEidscaControl.txt' $output = $output -replace '%ArrayOfControlIds%', "'$($controlIds -replace '^.*\.' -join "','")'" $output = $output -replace '%InternalFunctionNameTemplate%', (GetEidscaPsFunctionName -checkId 'EIDSCA.$CheckId') diff --git a/powershell/internal/Clear-ModuleVariable.ps1 b/powershell/internal/Clear-ModuleVariable.ps1 index 06fefdac..dc6e03f6 100644 --- a/powershell/internal/Clear-ModuleVariable.ps1 +++ b/powershell/internal/Clear-ModuleVariable.ps1 @@ -9,7 +9,7 @@ This function will be called for each fresh run of Invoke-Maester. #> -Function Clear-ModuleVariable { +function Clear-ModuleVariable { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments', '', Justification='Module variables used in other functions.')] param() diff --git a/powershell/internal/Get-GraphObjectMarkdown.ps1 b/powershell/internal/Get-GraphObjectMarkdown.ps1 index 603e9094..2744cf4d 100644 --- a/powershell/internal/Get-GraphObjectMarkdown.ps1 +++ b/powershell/internal/Get-GraphObjectMarkdown.ps1 @@ -12,7 +12,7 @@ Returns a markdown list of Conditional Access policies with deeplinks to the relevant CA blade in Entra portal. #> -Function Get-GraphObjectMarkdown { +function Get-GraphObjectMarkdown { [CmdletBinding()] [OutputType([string])] param( diff --git a/powershell/internal/Get-IsNewMaesterVersionAvailable.ps1 b/powershell/internal/Get-IsNewMaesterVersionAvailable.ps1 index 273694bb..c578a4cb 100644 --- a/powershell/internal/Get-IsNewMaesterVersionAvailable.ps1 +++ b/powershell/internal/Get-IsNewMaesterVersionAvailable.ps1 @@ -13,7 +13,7 @@ Get-IsNewMaesterVersionAvailable #> -Function Get-IsNewMaesterVersionAvailable { +function Get-IsNewMaesterVersionAvailable { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Justification = 'Colors are beautiful')] [OutputType([bool])] [CmdletBinding()] diff --git a/powershell/internal/Get-MtConfirmation.ps1 b/powershell/internal/Get-MtConfirmation.ps1 index bb5e48a8..f1dfae84 100644 --- a/powershell/internal/Get-MtConfirmation.ps1 +++ b/powershell/internal/Get-MtConfirmation.ps1 @@ -1,4 +1,4 @@ -Function Get-MtConfirmation { +function Get-MtConfirmation { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Justification = 'Colors are beautiful')] [CmdletBinding()] param ($message) diff --git a/powershell/internal/Get-MtMaesterTestFolderPath.ps1 b/powershell/internal/Get-MtMaesterTestFolderPath.ps1 index 62141443..688e1887 100644 --- a/powershell/internal/Get-MtMaesterTestFolderPath.ps1 +++ b/powershell/internal/Get-MtMaesterTestFolderPath.ps1 @@ -1,3 +1,3 @@ -Function Get-MtMaesterTestFolderPath { +function Get-MtMaesterTestFolderPath { return Join-Path -Path $PSScriptRoot -ChildPath "../maester-tests" } \ No newline at end of file diff --git a/powershell/internal/Get-MtMarkdownReport.ps1 b/powershell/internal/Get-MtMarkdownReport.ps1 index 6a05800c..c53604f7 100644 --- a/powershell/internal/Get-MtMarkdownReport.ps1 +++ b/powershell/internal/Get-MtMarkdownReport.ps1 @@ -11,7 +11,7 @@ Get-MtMarkdownReport $maesterResults #> -Function Get-MtMarkdownReport { +function Get-MtMarkdownReport { [CmdletBinding()] param( # The Maester test results returned from `Invoke-Pester -PassThru | ConvertTo-MtMaesterResult` diff --git a/powershell/internal/Get-MtUserInteractive.ps1 b/powershell/internal/Get-MtUserInteractive.ps1 index c7eb9673..3a86090c 100644 --- a/powershell/internal/Get-MtUserInteractive.ps1 +++ b/powershell/internal/Get-MtUserInteractive.ps1 @@ -3,7 +3,7 @@ Returns if the current session is interactive or is being run in a non-interactive environment (e.g. Azure DevOps Pipeline or GitHub Actions). #> -Function Get-MtUserInteractive { +function Get-MtUserInteractive { [CmdletBinding()] [OutputType([bool])] param () diff --git a/powershell/internal/Invoke-MtGraphRequestCache.ps1 b/powershell/internal/Invoke-MtGraphRequestCache.ps1 index ebc7fd27..3962d0a9 100644 --- a/powershell/internal/Invoke-MtGraphRequestCache.ps1 +++ b/powershell/internal/Invoke-MtGraphRequestCache.ps1 @@ -2,7 +2,7 @@ .SYNOPSIS Enhanced version of Invoke-MgGraphRequest that supports caching. #> -Function Invoke-MtGraphRequestCache { +function Invoke-MtGraphRequestCache { [CmdletBinding()] param( [Parameter(Mandatory = $true)] diff --git a/powershell/internal/Reset-MtProgressView.ps1 b/powershell/internal/Reset-MtProgressView.ps1 index 2fb38c58..7f2e54f4 100644 --- a/powershell/internal/Reset-MtProgressView.ps1 +++ b/powershell/internal/Reset-MtProgressView.ps1 @@ -3,7 +3,7 @@ Resets the style of the progress bar to the previous state on Windows. #> -Function Reset-MtProgressView { +function Reset-MtProgressView { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'TODO: Implement ShouldProcess')] [CmdletBinding()] param () diff --git a/powershell/internal/Set-MtProgressView.ps1 b/powershell/internal/Set-MtProgressView.ps1 index 8d5a8dec..1f4e77e6 100644 --- a/powershell/internal/Set-MtProgressView.ps1 +++ b/powershell/internal/Set-MtProgressView.ps1 @@ -3,7 +3,7 @@ Set the style of the progress bar to classic on Windows for better compatibility with the console. #> -Function Set-MtProgressView { +function Set-MtProgressView { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'TODO: Implement ShouldProcess')] [CmdletBinding()] param () diff --git a/powershell/internal/Update-MtMaesterTests.ps1 b/powershell/internal/Update-MtMaesterTests.ps1 index 424e3364..94dbe84b 100644 --- a/powershell/internal/Update-MtMaesterTests.ps1 +++ b/powershell/internal/Update-MtMaesterTests.ps1 @@ -1,7 +1,7 @@ <# #> -Function Update-MtMaesterTests { +function Update-MtMaesterTests { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseSingularNouns', '', Justification = 'This command updates multiple tests')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '', Justification = 'Colors are beautiful')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'TODO: Implement ShouldProcess')] diff --git a/powershell/internal/Write-MtProgress.ps1 b/powershell/internal/Write-MtProgress.ps1 index 7a4feaf8..d03fdcbd 100644 --- a/powershell/internal/Write-MtProgress.ps1 +++ b/powershell/internal/Write-MtProgress.ps1 @@ -6,7 +6,7 @@ Show updates to the user on the current activity. #> -Function Write-MtProgress { +function Write-MtProgress { [CmdletBinding()] Param ( # Specifies the first line of text in the heading above the status bar. This text describes the activity whose progress is being reported. diff --git a/powershell/internal/eidsca/@templateps1.txt b/powershell/internal/eidsca/@templateps1.txt index d15cf75d..c15ddaa7 100644 --- a/powershell/internal/eidsca/@templateps1.txt +++ b/powershell/internal/eidsca/@templateps1.txt @@ -16,7 +16,7 @@ Returns the result of graph.microsoft.com/beta/%RelativeUri%.%CurrentValue% -%PwshCompareOperator% %RecommendedValue% #> -Function %PSFunctionName% { +function %PSFunctionName% { [CmdletBinding()] [OutputType([bool])] param() diff --git a/powershell/internal/eidsca/Test-MtEidscaAF01.ps1 b/powershell/internal/eidsca/Test-MtEidscaAF01.ps1 index a339c6d4..61a28d3f 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAF01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAF01.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2').state -eq 'enabled' #> -Function Test-MtEidscaAF01 { +function Test-MtEidscaAF01 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAF02.ps1 b/powershell/internal/eidsca/Test-MtEidscaAF02.ps1 index 692db2d7..06ff46ce 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAF02.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAF02.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2').isSelfServiceRegistrationAllowed -eq 'true' #> -Function Test-MtEidscaAF02 { +function Test-MtEidscaAF02 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'Fido2' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of FIDO2 security keys is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAF03.ps1 b/powershell/internal/eidsca/Test-MtEidscaAF03.ps1 index d553148d..a7157d29 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAF03.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAF03.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2').isAttestationEnforced -eq 'true' #> -Function Test-MtEidscaAF03 { +function Test-MtEidscaAF03 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'Fido2' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of FIDO2 security keys is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAF04.ps1 b/powershell/internal/eidsca/Test-MtEidscaAF04.ps1 index c04522a1..5e90228b 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAF04.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAF04.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2').keyRestrictions.isEnforced -eq 'true' #> -Function Test-MtEidscaAF04 { +function Test-MtEidscaAF04 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'Fido2' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of FIDO2 security keys is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAF05.ps1 b/powershell/internal/eidsca/Test-MtEidscaAF05.ps1 index 19e03f56..54947f80 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAF05.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAF05.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2').keyRestrictions.aaGuids -notcontains $null -eq 'true' #> -Function Test-MtEidscaAF05 { +function Test-MtEidscaAF05 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'Fido2' -or (Test-MtEidscaAF04) -eq $false ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of FIDO2 security keys is not enabled and key restriction not enforced.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAF06.ps1 b/powershell/internal/eidsca/Test-MtEidscaAF06.ps1 index fbe11330..a1d30f31 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAF06.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAF06.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2').keyRestrictions.aaGuids -notcontains $null -and ($result.keyRestrictions.enforcementType -eq 'allow' -or $result.keyRestrictions.enforcementType -eq 'block') -eq 'true' #> -Function Test-MtEidscaAF06 { +function Test-MtEidscaAF06 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'Fido2' -or (Test-MtEidscaAF04) -eq $false ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of FIDO2 security keys is not enabled and key restriction not enforced.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Fido2')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAG01.ps1 b/powershell/internal/eidsca/Test-MtEidscaAG01.ps1 index 5265ae5e..4c616d10 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAG01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAG01.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy.policyMigrationState -eq 'migrationComplete' #> -Function Test-MtEidscaAG01 { +function Test-MtEidscaAG01 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAG02.ps1 b/powershell/internal/eidsca/Test-MtEidscaAG02.ps1 index cef2a603..bfc95f83 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAG02.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAG02.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy.reportSuspiciousActivitySettings.state -eq 'enabled' #> -Function Test-MtEidscaAG02 { +function Test-MtEidscaAG02 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAG03.ps1 b/powershell/internal/eidsca/Test-MtEidscaAG03.ps1 index f3a62cad..908072ab 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAG03.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAG03.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy.reportSuspiciousActivitySettings.includeTarget.id -eq 'all_users' #> -Function Test-MtEidscaAG03 { +function Test-MtEidscaAG03 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM01.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM01.ps1 index 688769c1..92f61ac6 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM01.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').state -eq 'enabled' #> -Function Test-MtEidscaAM01 { +function Test-MtEidscaAM01 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM02.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM02.ps1 index 8e6064c8..506d66e9 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM02.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM02.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').state -eq 'enabled' #> -Function Test-MtEidscaAM02 { +function Test-MtEidscaAM02 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'MicrosoftAuthenticator' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Microsoft Authenticator is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM03.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM03.ps1 index 344fc9bc..03bfae95 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM03.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM03.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').featureSettings.numberMatchingRequiredState.state -eq 'enabled' #> -Function Test-MtEidscaAM03 { +function Test-MtEidscaAM03 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'MicrosoftAuthenticator' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Microsoft Authenticator is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM04.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM04.ps1 index 0513d139..e2250537 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM04.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM04.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').featureSettings.numberMatchingRequiredState.includeTarget.id -eq 'all_users' #> -Function Test-MtEidscaAM04 { +function Test-MtEidscaAM04 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'MicrosoftAuthenticator' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Microsoft Authenticator is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM06.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM06.ps1 index 623547b7..ce163167 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM06.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM06.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').featureSettings.displayAppInformationRequiredState.state -eq 'enabled' #> -Function Test-MtEidscaAM06 { +function Test-MtEidscaAM06 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'MicrosoftAuthenticator' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Microsoft Authenticator is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM07.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM07.ps1 index c8388a2d..c78cddd6 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM07.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM07.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').featureSettings.displayAppInformationRequiredState.includeTarget.id -eq 'all_users' #> -Function Test-MtEidscaAM07 { +function Test-MtEidscaAM07 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'MicrosoftAuthenticator' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Microsoft Authenticator is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM09.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM09.ps1 index 84c3e5b2..36db67fa 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM09.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM09.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').featureSettings.displayLocationInformationRequiredState.state -eq 'enabled' #> -Function Test-MtEidscaAM09 { +function Test-MtEidscaAM09 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'MicrosoftAuthenticator' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Microsoft Authenticator is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAM10.ps1 b/powershell/internal/eidsca/Test-MtEidscaAM10.ps1 index 8b9190f9..1e9e5d19 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAM10.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAM10.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator').featureSettings.displayLocationInformationRequiredState.includeTarget.id -eq 'all_users' #> -Function Test-MtEidscaAM10 { +function Test-MtEidscaAM10 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'MicrosoftAuthenticator' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Microsoft Authenticator is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('MicrosoftAuthenticator')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP01.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP01.ps1 index 16c4e744..1a8fedfd 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP01.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.allowedToUseSSPR -eq 'false' #> -Function Test-MtEidscaAP01 { +function Test-MtEidscaAP01 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP04.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP04.ps1 index 38c9346d..1addffc8 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP04.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP04.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.allowInvitesFrom -in @('adminsAndGuestInviters','none') #> -Function Test-MtEidscaAP04 { +function Test-MtEidscaAP04 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP05.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP05.ps1 index bc65994a..af8cfbac 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP05.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP05.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.allowedToSignUpEmailBasedSubscriptions -eq 'false' #> -Function Test-MtEidscaAP05 { +function Test-MtEidscaAP05 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP06.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP06.ps1 index 3a81ca82..7a817102 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP06.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP06.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.allowEmailVerifiedUsersToJoinOrganization -eq 'false' #> -Function Test-MtEidscaAP06 { +function Test-MtEidscaAP06 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP07.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP07.ps1 index 55619c40..90702277 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP07.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP07.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.guestUserRoleId -eq '2af84b1e-32c8-42b7-82bc-daa82404023b' #> -Function Test-MtEidscaAP07 { +function Test-MtEidscaAP07 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP08.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP08.ps1 index 2614c089..652a97b0 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP08.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP08.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.permissionGrantPolicyIdsAssignedToDefaultUserRole | Sort-Object -Descending | select-object -first 1 -eq 'ManagePermissionGrantsForSelf.microsoft-user-default-low' #> -Function Test-MtEidscaAP08 { +function Test-MtEidscaAP08 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP09.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP09.ps1 index c932c357..39ed0ea8 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP09.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP09.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.allowUserConsentForRiskyApps -eq 'false' #> -Function Test-MtEidscaAP09 { +function Test-MtEidscaAP09 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP10.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP10.ps1 index 4eaab83a..a5c7329d 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP10.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP10.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.defaultUserRolePermissions.allowedToCreateApps -eq 'false' #> -Function Test-MtEidscaAP10 { +function Test-MtEidscaAP10 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAP14.ps1 b/powershell/internal/eidsca/Test-MtEidscaAP14.ps1 index d94c572d..badaa225 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAP14.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAP14.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authorizationPolicy.defaultUserRolePermissions.allowedToReadOtherUsers -eq 'true' #> -Function Test-MtEidscaAP14 { +function Test-MtEidscaAP14 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authorizationPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAT01.ps1 b/powershell/internal/eidsca/Test-MtEidscaAT01.ps1 index 51749b85..c160d2b1 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAT01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAT01.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('TemporaryAccessPass').state -eq 'enabled' #> -Function Test-MtEidscaAT01 { +function Test-MtEidscaAT01 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('TemporaryAccessPass')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAT02.ps1 b/powershell/internal/eidsca/Test-MtEidscaAT02.ps1 index 9c3fd75c..fcc63372 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAT02.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAT02.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('TemporaryAccessPass').isUsableOnce -eq 'true' #> -Function Test-MtEidscaAT02 { +function Test-MtEidscaAT02 { [CmdletBinding()] [OutputType([bool])] param() if ( $EnabledAuthMethods -notcontains 'TemporaryAccessPass' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Authentication method of Temporary Access Pass is not enabled.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('TemporaryAccessPass')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaAV01.ps1 b/powershell/internal/eidsca/Test-MtEidscaAV01.ps1 index fd814861..3fca4d2e 100644 --- a/powershell/internal/eidsca/Test-MtEidscaAV01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaAV01.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Voice').state -eq 'disabled' #> -Function Test-MtEidscaAV01 { +function Test-MtEidscaAV01 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/authenticationMethodsPolicy/authenticationMethodConfigurations('Voice')" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaCP01.ps1 b/powershell/internal/eidsca/Test-MtEidscaCP01.ps1 index 44435cc0..965cca5e 100644 --- a/powershell/internal/eidsca/Test-MtEidscaCP01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaCP01.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'EnableGroupSpecificConsent' | select-object -expand value -eq 'False' #> -Function Test-MtEidscaCP01 { +function Test-MtEidscaCP01 { [CmdletBinding()] [OutputType([bool])] param() if ( $SettingsApiAvailable -notcontains 'EnableGroupSpecificConsent' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Settings value is not available. This may be due to the change that this API is no longer available for recent created tenants.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaCP03.ps1 b/powershell/internal/eidsca/Test-MtEidscaCP03.ps1 index 8a483247..0c0cb775 100644 --- a/powershell/internal/eidsca/Test-MtEidscaCP03.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaCP03.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'BlockUserConsentForRiskyApps' | select-object -expand value -eq 'true' #> -Function Test-MtEidscaCP03 { +function Test-MtEidscaCP03 { [CmdletBinding()] [OutputType([bool])] param() if ( $SettingsApiAvailable -notcontains 'BlockUserConsentForRiskyApps' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Settings value is not available. This may be due to the change that this API is no longer available for recent created tenants.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaCP04.ps1 b/powershell/internal/eidsca/Test-MtEidscaCP04.ps1 index d9bb2602..1e817c16 100644 --- a/powershell/internal/eidsca/Test-MtEidscaCP04.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaCP04.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'EnableAdminConsentRequests' | select-object -expand value -eq 'true' #> -Function Test-MtEidscaCP04 { +function Test-MtEidscaCP04 { [CmdletBinding()] [OutputType([bool])] param() if ( $SettingsApiAvailable -notcontains 'EnableAdminConsentRequests' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Settings value is not available. This may be due to the change that this API is no longer available for recent created tenants.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaCR01.ps1 b/powershell/internal/eidsca/Test-MtEidscaCR01.ps1 index 985bde51..f2303aa9 100644 --- a/powershell/internal/eidsca/Test-MtEidscaCR01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaCR01.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/policies/adminConsentRequestPolicy.isEnabled -eq 'true' #> -Function Test-MtEidscaCR01 { +function Test-MtEidscaCR01 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaCR02.ps1 b/powershell/internal/eidsca/Test-MtEidscaCR02.ps1 index af93e1c0..a78acc8c 100644 --- a/powershell/internal/eidsca/Test-MtEidscaCR02.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaCR02.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/adminConsentRequestPolicy.notifyReviewers -eq 'true' #> -Function Test-MtEidscaCR02 { +function Test-MtEidscaCR02 { [CmdletBinding()] [OutputType([bool])] param() if ( ($EnabledAdminConsentWorkflow) -eq $false ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Admin Consent Workflow is not enabled' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaCR03.ps1 b/powershell/internal/eidsca/Test-MtEidscaCR03.ps1 index 0cd26b5a..ba916ca2 100644 --- a/powershell/internal/eidsca/Test-MtEidscaCR03.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaCR03.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/adminConsentRequestPolicy.notifyReviewers -eq 'true' #> -Function Test-MtEidscaCR03 { +function Test-MtEidscaCR03 { [CmdletBinding()] [OutputType([bool])] param() if ( ($EnabledAdminConsentWorkflow) -eq $false ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Admin Consent Workflow is not enabled' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaCR04.ps1 b/powershell/internal/eidsca/Test-MtEidscaCR04.ps1 index af919ba8..c92983af 100644 --- a/powershell/internal/eidsca/Test-MtEidscaCR04.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaCR04.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/policies/adminConsentRequestPolicy.requestDurationInDays -eq '30' #> -Function Test-MtEidscaCR04 { +function Test-MtEidscaCR04 { [CmdletBinding()] [OutputType([bool])] param() if ( ($EnabledAdminConsentWorkflow) -eq $false ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Admin Consent Workflow is not enabled' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "policies/adminConsentRequestPolicy" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaPR01.ps1 b/powershell/internal/eidsca/Test-MtEidscaPR01.ps1 index 4ec058bf..4bce675f 100644 --- a/powershell/internal/eidsca/Test-MtEidscaPR01.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaPR01.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'BannedPasswordCheckOnPremisesMode' | select-object -expand value -eq 'Enforce' #> -Function Test-MtEidscaPR01 { +function Test-MtEidscaPR01 { [CmdletBinding()] [OutputType([bool])] param() if ( $SettingsApiAvailable -notcontains 'BannedPasswordCheckOnPremisesMode' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Settings value is not available. This may be due to the change that this API is no longer available for recent created tenants.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaPR02.ps1 b/powershell/internal/eidsca/Test-MtEidscaPR02.ps1 index 21c36faf..bd7850a7 100644 --- a/powershell/internal/eidsca/Test-MtEidscaPR02.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaPR02.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'EnableBannedPasswordCheckOnPremises' | select-object -expand value -eq 'True' #> -Function Test-MtEidscaPR02 { +function Test-MtEidscaPR02 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaPR03.ps1 b/powershell/internal/eidsca/Test-MtEidscaPR03.ps1 index f99dc1d4..1e03952a 100644 --- a/powershell/internal/eidsca/Test-MtEidscaPR03.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaPR03.ps1 @@ -16,14 +16,14 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'EnableBannedPasswordCheck' | select-object -expand value -eq 'True' #> -Function Test-MtEidscaPR03 { +function Test-MtEidscaPR03 { [CmdletBinding()] [OutputType([bool])] param() if ( $SettingsApiAvailable -notcontains 'EnableBannedPasswordCheck' ) { Add-MtTestResultDetail -SkippedBecause 'Custom' -SkippedCustomReason 'Settings value is not available. This may be due to the change that this API is no longer available for recent created tenants.' - return $null + return $null } $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaPR05.ps1 b/powershell/internal/eidsca/Test-MtEidscaPR05.ps1 index 9e1df779..de6e2b5d 100644 --- a/powershell/internal/eidsca/Test-MtEidscaPR05.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaPR05.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'LockoutDurationInSeconds' | select-object -expand value -ge '60' #> -Function Test-MtEidscaPR05 { +function Test-MtEidscaPR05 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaPR06.ps1 b/powershell/internal/eidsca/Test-MtEidscaPR06.ps1 index c4a9638c..f8892a32 100644 --- a/powershell/internal/eidsca/Test-MtEidscaPR06.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaPR06.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'LockoutThreshold' | select-object -expand value -eq '10' #> -Function Test-MtEidscaPR06 { +function Test-MtEidscaPR06 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaST08.ps1 b/powershell/internal/eidsca/Test-MtEidscaST08.ps1 index f7cb20f6..218acb86 100644 --- a/powershell/internal/eidsca/Test-MtEidscaST08.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaST08.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'AllowGuestsToBeGroupOwner' | select-object -expand value -eq 'false' #> -Function Test-MtEidscaST08 { +function Test-MtEidscaST08 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/internal/eidsca/Test-MtEidscaST09.ps1 b/powershell/internal/eidsca/Test-MtEidscaST09.ps1 index 575d9809..81c3999e 100644 --- a/powershell/internal/eidsca/Test-MtEidscaST09.ps1 +++ b/powershell/internal/eidsca/Test-MtEidscaST09.ps1 @@ -16,12 +16,12 @@ Returns the result of graph.microsoft.com/beta/settings.values | where-object name -eq 'AllowGuestsToAccessGroups' | select-object -expand value -eq 'True' #> -Function Test-MtEidscaST09 { +function Test-MtEidscaST09 { [CmdletBinding()] [OutputType([bool])] param() - + $result = Invoke-MtGraphRequest -RelativeUri "settings" -ApiVersion beta diff --git a/powershell/public/cisa/@templateps1.txt b/powershell/public/cisa/@templateps1.txt index 7595a6d1..44556a4f 100644 --- a/powershell/public/cisa/@templateps1.txt +++ b/powershell/public/cisa/@templateps1.txt @@ -12,7 +12,7 @@ Returns true if ... #> -Function FunctionName { +function FunctionName { [CmdletBinding()] [OutputType([bool])] param()