Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumping release to 1.7.0 #118

Merged
merged 34 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f3acd5f
ENHANCEMENT: Reduce reliance on PSSession imports
gavsto Feb 5, 2022
86d2b75
ADD: Azure AD Connect Endpoint API
gavsto Feb 5, 2022
12f5c56
Version update
gavsto Feb 5, 2022
b29a45c
Merge branch 'dev' into dev
gavsto Feb 5, 2022
9f9afc7
Merge pull request #113 from gavsto/dev
gavsto Feb 5, 2022
f17ae11
ENHANCEMENT: Added Licenses totals and extended whitelisted SKUs
gavsto Feb 6, 2022
f04a658
Merge pull request #114 from gavsto/dev
gavsto Feb 6, 2022
e225872
NEW API: All Tenant Device Compliance using Lighthouse API
gavsto Feb 6, 2022
0504acb
Merge pull request #115 from gavsto/dev
gavsto Feb 6, 2022
e93cf62
BUG FIX: Corrected an oopsy in the API call for tenant filter
gavsto Feb 6, 2022
088fdd0
Merge pull request #116 from gavsto/dev
gavsto Feb 6, 2022
2979a78
added error handling for everything that requires a license
KelvinTegelaar Feb 11, 2022
67a9f46
added potential exchange error
KelvinTegelaar Feb 11, 2022
21536b5
fixes #735
KelvinTegelaar Feb 11, 2022
cc946b2
improved alerts list
KelvinTegelaar Feb 14, 2022
9b7b321
added set alert function
KelvinTegelaar Feb 14, 2022
0bdbbd6
Update DNSHelper.psm1
JohnDuprey Feb 15, 2022
0864829
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Feb 15, 2022
6429161
Update 4d9206b0-4f96-41e6-86a5-f78cdcff5069.IntuneTemplate.json
KelvinTegelaar Feb 15, 2022
ce10d01
Merge remote-tracking branch 'upstream/dev' into dev
JohnDuprey Feb 15, 2022
d9e5de4
Update DNSHelper.psm1
JohnDuprey Feb 16, 2022
0fec037
Update DNSHelper.psm1
JohnDuprey Feb 16, 2022
a490b29
Update DNSHelper.psm1
JohnDuprey Feb 16, 2022
40d1df9
Update DNSHelper.psm1
JohnDuprey Feb 16, 2022
b95b29a
Update DNSHelper.psm1
JohnDuprey Feb 16, 2022
de6c19a
Merge pull request #117 from johnduprey/dev
KelvinTegelaar Feb 16, 2022
16fa761
fixed minor issues with AAD report.
KelvinTegelaar Feb 16, 2022
ae926e5
Merge branch 'dev' of https://github.com/KelvinTegelaar/CIPP-API into…
KelvinTegelaar Feb 16, 2022
36d9f9b
scheduler stuff
KelvinTegelaar Feb 16, 2022
665a446
revert issue
KelvinTegelaar Feb 16, 2022
3a7478d
added license report
KelvinTegelaar Feb 17, 2022
64f3091
added option for private teams
KelvinTegelaar Feb 18, 2022
cff6c3e
731
KelvinTegelaar Feb 18, 2022
3179b86
bumped version for release
KelvinTegelaar Feb 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AddTeam/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ try {

$TeamsSettings = [PSCustomObject]@{
"[email protected]" = "https://graph.microsoft.com/v1.0/teamsTemplates('standard')"
"visibility" = "Public"
"visibility" = $userobj.visibility
"displayName" = $userobj.displayname
"description" = $userobj.description
"members" = @($owners)
Expand Down
42 changes: 15 additions & 27 deletions BestPracticeAnalyser_All/run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ $Result = [PSCustomObject]@{
DisabledSharedMailboxLogins = ""
DisabledSharedMailboxLoginsCount = ""
UnusedLicensesCount = ""
UnusedLicensesTotal = ""
UnusedLicensesResult = ""
UnusedLicenseList = ""
SecureScoreCurrent = ""
Expand Down Expand Up @@ -78,24 +79,14 @@ catch {
Log-request -API "BestPracticeAnalyser" -tenant $tenant -message "Privacy Enabled State on $($tenant) Error: $($_.exception.message)" -sev "Error"
}


# Build up and enter an Exchange PSSession for the next section
try {
$tokenvalue = ConvertTo-SecureString (Get-GraphToken -AppID 'a0c73c16-a7e3-4564-9a95-2bdf47383716' -RefreshToken $ENV:ExchangeRefreshToken -Scope 'https://outlook.office365.com/.default' -Tenantid $($Tenant)).Authorization -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($upn, $tokenValue)
$session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.outlook.com/powershell-liveid?DelegatedOrg=$($Tenant)&BasicAuthToOAuthConversion=true" -Credential $credential -Authentication Basic -AllowRedirection -ErrorAction Continue
Import-PSSession $session -ea Silentlycontinue -AllowClobber -CommandName "Get-Mailbox", "Set-mailbox", "Get-AdminAuditLogConfig", "Get-OrganizationConfig", "Enable-OrganizationCustomization" | Out-Null
Log-request -API "BestPracticeAnalyser" -tenant $tenant -message "Exchange PS Sesssion Generated on $($tenant) is successful" -sev "Debug"
}
catch {
Log-request -API "BestPracticeAnalyser" -tenant $tenant -message "Exchange PS Session on $($tenant) Error: $($_.exception.message)" -sev "Error"
}


# Get Send and Send Behalf Of
try {
# Send and Send Behalf Of
$MailboxBPA = Get-Mailbox -ResultSize Unlimited -RecipientTypeDetails UserMailbox, SharedMailbox
$MailboxBPAParams = @{
ResultSize = 'Unlimited'
RecipientTypeDetails = 'UserMailbox, SharedMailbox'
}
$MailboxBPA = New-ExoRequest -tenantid $Tenant -cmdlet "Get-Mailbox"
$TotalMailboxes = $MailboxBPA | Measure-Object | Select-Object -ExpandProperty Count
$TotalMessageCopyForSentAsEnabled = $MailboxBPA | Where-Object { $_.MessageCopyForSentAsEnabled -eq $true } | Measure-Object | Select-Object -ExpandProperty Count
$TotalMessageCopyForSendOnBehalfEnabled = $MailboxBPA | Where-Object { $_.MessageCopyForSendOnBehalfEnabled -eq $true } | Measure-Object | Select-Object -ExpandProperty Count
Expand All @@ -119,24 +110,15 @@ catch {

# Get Unified Audit Log
try {
$Result.UnifiedAuditLog = Get-AdminAuditLogConfig | Select-Object -ExpandProperty UnifiedAuditLogIngestionEnabled
$EXOAdminAuditLogConfig = New-ExoRequest -tenantid $Tenant -cmdlet "Get-AdminAuditLogConfig"
$Result.UnifiedAuditLog = $EXOAdminAuditLogConfig | Select-Object -ExpandProperty UnifiedAuditLogIngestionEnabled
Log-request -API "BestPracticeAnalyser" -tenant $tenant -message "Unified Audit Log on $($tenant) is $($Result.UnifiedAuditLog)" -sev "Debug"

}
catch {
Log-request -API "BestPracticeAnalyser" -tenant $tenant -message "Unified Audit Log on $($tenant). Error: $($_.exception.message)" -sev "Error"
}


# Important to clean up the remote session
try {
Get-PSSession | Remove-PSSession
}
catch {
Log-request -API "BestPracticeAnalyser" -tenant $tenant -message "Error cleaning up PSSession on $($tenant). Error: $($_.exception.message)" -sev "Error"
}


# Get Basic Auth States
try {
$BasicAuthDisable = Invoke-RestMethod -ContentType "application/json;charset=UTF-8" -Uri 'https://admin.microsoft.com/admin/api/services/apps/modernAuth' -Method GET -Headers @{
Expand Down Expand Up @@ -244,13 +226,19 @@ try {
'X-Requested-With' = 'XMLHttpRequest'
}

$WhiteListedSKUs = "FLOW_FREE", "TEAMS_EXPLORATORY", "TEAMS_COMMERCIAL_TRIAL", "POWERAPPS_VIRAL", "POWER_BI_STANDARD", "DYN365_ENTERPRISE_P1_IW"
$WhiteListedSKUs = "FLOW_FREE", "TEAMS_EXPLORATORY", "TEAMS_COMMERCIAL_TRIAL", "POWERAPPS_VIRAL", "POWER_BI_STANDARD", "DYN365_ENTERPRISE_P1_IW", "STREAM", "Dynamics 365 for Financials for IWs", "POWERAPPS_PER_APP_IW"
$UnusedLicenses = $LicenseUsage | Where-Object { ($_.Purchased -ne $_.Consumed) -and ($WhiteListedSKUs -notcontains $_.AccountSkuId.SkuPartNumber) }
$UnusedLicensesCount = $UnusedLicenses | Measure-Object | Select-Object -ExpandProperty Count
$UnusedLicensesResult = if ($UnusedLicensesCount -gt 0) { "FAIL" } else { "PASS" }
$Result.UnusedLicenseList = ($UnusedLicensesListBuilder = foreach ($License in $UnusedLicenses) {
"SKU: $($License.AccountSkuId.SkuPartNumber), Purchased: $($License.Purchased), Consumed: $($License.Consumed)"
}) -join "<br />"

$TempCount = 0
foreach ($License in $UnusedLicenses) {
$TempCount = $TempCount + ($($License.Purchased) - $($License.Consumed))
}
$Result.UnusedLicensesTotal = $TempCount
$Result.UnusedLicensesCount = $UnusedLicensesCount
$Result.UnusedLicensesResult = $UnusedLicensesResult
Log-request -API "BestPracticeAnalyser" -tenant $tenant -message "Unused Licenses on $($tenant). $($Result.UnusedLicensesCount) total not matching" -sev "Debug"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Displayname": "CIPP Default: Set screen lock time to 5 minutes",
"Description": "Sets the screen to lock after 5 minutes of inactivity.",
"RAWJson": "{\"name\":\"Set Screen Lockout to 5 minutes\",\"description\":\"\",\"platforms\":\"windows10\",\"technologies\":\"mdm\",\"roleScopeTagIds\":[\"0\"],\"settings\":[{\"@odata.type\":\"#microsoft.graph.deviceManagementConfigurationSetting\",\"settingInstance\":{\"@odata.type\":\"#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance\",\"settingDefinitionId\":\"device_vendor_msft_policy_config_localpoliciessecurityoptions_interactivelogon_machineinactivitylimit_v2\",\"simpleSettingValue\":{\"@odata.type\":\"#microsoft.graph.deviceManagementConfigurationIntegerSettingValue\",\"value\":5}}}]}",
"RAWJson": "{\"name\":\"Set Screen Lockout to 5 minutes\",\"description\":\"\",\"platforms\":\"windows10\",\"technologies\":\"mdm\",\"roleScopeTagIds\":[\"0\"],\"settings\":[{\"@odata.type\":\"#microsoft.graph.deviceManagementConfigurationSetting\",\"settingInstance\":{\"@odata.type\":\"#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance\",\"settingDefinitionId\":\"device_vendor_msft_policy_config_localpoliciessecurityoptions_interactivelogon_machineinactivitylimit_v2\",\"simpleSettingValue\":{\"@odata.type\":\"#microsoft.graph.deviceManagementConfigurationIntegerSettingValue\",\"value\":300}}}]}",
"Type": "Catalog",
"GUID": "4d9206b0-4f96-41e6-86a5-f78cdcff5069"
}
Loading