add: DomainName paramter to get-mggraph and test 1.3.1
This commit is contained in:
@@ -14,11 +14,11 @@ function Get-CISMgOutput {
|
|||||||
|
|
||||||
#>
|
#>
|
||||||
[cmdletBinding()]
|
[cmdletBinding()]
|
||||||
[OutputType([string])]
|
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory = $true)]
|
[Parameter(Mandatory = $true)]
|
||||||
[String]
|
[String]$Rec,
|
||||||
$Rec
|
[Parameter(Mandatory = $false)]
|
||||||
|
[String]$DomainName
|
||||||
)
|
)
|
||||||
|
|
||||||
begin {
|
begin {
|
||||||
@@ -56,6 +56,15 @@ function Get-CISMgOutput {
|
|||||||
$allGroups = Get-MgGroup -All | Where-Object { $_.Visibility -eq "Public" } | Select-Object DisplayName, Visibility
|
$allGroups = Get-MgGroup -All | Where-Object { $_.Visibility -eq "Public" } | Select-Object DisplayName, Visibility
|
||||||
return $allGroups
|
return $allGroups
|
||||||
}
|
}
|
||||||
|
'1.3.1' {
|
||||||
|
# Test-PasswordNeverExpirePolicy.ps1
|
||||||
|
$domains = if ($DomainName) {
|
||||||
|
Get-MgDomain -DomainId $DomainName
|
||||||
|
} else {
|
||||||
|
Get-MgDomain
|
||||||
|
}
|
||||||
|
return $domains
|
||||||
|
}
|
||||||
'5.1.2.3' {
|
'5.1.2.3' {
|
||||||
# Retrieve the tenant creation policy
|
# Retrieve the tenant creation policy
|
||||||
$tenantCreationPolicy = (Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object AllowedToCreateTenants
|
$tenantCreationPolicy = (Get-MgPolicyAuthorizationPolicy).DefaultUserRolePermissions | Select-Object AllowedToCreateTenants
|
||||||
|
Reference in New Issue
Block a user