Human Readable bitmask translation (#14)

This commit is contained in:
NSoy-MSFT 2021-10-05 10:58:26 -07:00 коммит произвёл GitHub
Родитель 39671532b5
Коммит d7833acc77
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 388 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,352 @@
<#
.Synopsis
Export-AgentStatusOpsReportWithProductStatusDescription - Exports the AgentStatusOpsReport which ProductStatus Description
.DESCRIPTION
Exports the AgentStatusOpsReport which ProductStatus Description
.PARAMETER OutputPath
The Path where report needs to be exported. Default Value: .\Output.csv
.EXAMPLE
PS C:\GitHub>.\Export-AgentStatusOpsReportExpandedProductStatus.ps1 -OutputPath .\Report.csv
#>
param([String]$OutputPath = "$env:Appdata\Output.csv")
## check for elevation
$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = New-Object Security.Principal.WindowsPrincipal $identity
if (!$principal.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)) {
Write-Host -ForegroundColor Red "Error: Must run elevated: run as administrator"
Write-Host "No commands completed"
return
}
$ProductStatusMap = @{}
$ProductStatusMap.Add(0, "No status" );
$ProductStatusMap.Add(1, "Service not running" );
$ProductStatusMap.Add(2, "Service started without any malware protection engine" );
$ProductStatusMap.Add(4, "Pending full scan due to threat action" );
$ProductStatusMap.Add(8, "Pending reboot due to threat action" );
$ProductStatusMap.Add(16, "Pending manual steps due to threat action" );
$ProductStatusMap.Add(32, "AV signatures out of date" );
$ProductStatusMap.Add(64, "AS signatures out of date" );
$ProductStatusMap.Add(128, "No quick scan has happened for a specified period" );
$ProductStatusMap.Add(256, "No full scan has happened for a specified period" );
$ProductStatusMap.Add(512, "System initiated scan in progress" );
$ProductStatusMap.Add(1024, "System initiated clean in progress" );
$ProductStatusMap.Add(2048, "There are samples pending submission" );
$ProductStatusMap.Add(4096, "Product running in evaluation mode" );
$ProductStatusMap.Add(8192, "PProduct running in non-genuine Windows mode" );
$ProductStatusMap.Add(16384, "Product expired" );
$ProductStatusMap.Add(32768, "Off-line scan required" );
$ProductStatusMap.Add(65536, "Service is shutting down as part of system shutdown" );
$ProductStatusMap.Add(131072, "Threat remediation failed critically" );
$ProductStatusMap.Add(262144, "Threat remediation failed non-critically" );
$ProductStatusMap.Add(524288, "No status flags set (well-initialized state)" );
$ProductStatusMap.Add(1048576, "Platform is out of date" );
$ProductStatusMap.Add(2097152, "Platform update is in progress" );
$ProductStatusMap.Add(4194304, "Platform is about to be outdated" );
$ProductStatusMap.Add(8388608, "Signature or platform end of life is past or is impending" );
$ProductStatusMap.Add(16777216, "Windows SMode signatures still in use on non-Win10S install" );
function Convert-ProductStatusToString ($productStatus)
{
$ProductDescriptions = New-Object Collections.Generic.List[String]
if($productStatus -eq 0)
{
$ProductDescriptions.Add("No status");
}
else
{
foreach($ProductStatusCode in $ProductStatusMap.Keys)
{
if($productStatus -band $ProductStatusCode)
{
$ProductDescriptions.Add($ProductStatusMap[$ProductStatusCode])
}
}
}
return $ProductDescriptions -join ","
}
#Installing dependencies if not already installed [Microsoft.Graph.Intune]
#from the powershell gallery
if(-not(Get-Module Microsoft.Graph.Intune -ListAvailable)){
Write-Host "Installing Intune Powershell SDK from Powershell Gallery..."
try{
Install-Module Microsoft.Graph.Intune -Force
}
catch{
Write-Host "Intune Powershell SDK was not installed successfully... `r`n$_"
}
}
if(Get-Module Microsoft.Graph.Intune -ListAvailable)
{
try{
Connect-MSGraph -ForceInteractive
}
catch
{
$errorMessage = $_.ToString()
Write-Host -ForegroundColor Red "Error:"$errorMessage
return
}
}
$StartTime = $(get-date)
$AgentStatusCollection = New-Object Collections.Generic.List[psobject]
$itemsFetched = 0;
$top = 50;
$skip = 0;
do
{
$ContentBody = '{"select": [],"skip": '+$skip + ',"top": ' + $top + ',"filter": "","orderby": ["DeviceName"],"search": ""}'
$AgentStatusReport = Invoke-MSGraphRequest -Url "https://graph.microsoft.com/beta/deviceManagement/reports/getUnhealthyDefenderAgentsReport" -HttpMethod POST -Content $ContentBody
ForEach ($agentStatus in $AgentStatusReport.Values)
{
$TranslatedAgentStatus = new-object psobject
for($i = 0; $i -lt $AgentStatusReport.Schema.Count; $i++)
{
$TranslatedAgentStatus | Add-Member -Name $AgentStatusReport.Schema[$i].Column -Value $agentStatus[$i] -MemberType NoteProperty
}
$productStatusString = Convert-ProductStatusToString($TranslatedAgentStatus.ProductStatus)
$TranslatedAgentStatus | Add-Member -Name "Product Status String" -Value $productStatusString -MemberType NoteProperty
$AgentStatusCollection.Add($TranslatedAgentStatus)
}
$elapsedTime = $(get-date) - $StartTime
$totalTime = "{0:HH:mm:ss}" -f ([datetime]$elapsedTime.Ticks)
[Int]$percentComplete = $itemsFetched/$AgentStatusReport.TotalRowCount*100
Write-Progress -Activity "Processing Agent Status Report" -Status "$percentComplete % Complete. Elapased time: $totalTime" -PercentComplete $percentComplete
$skip += $top;
$itemsFetched += $top;
}while($AgentStatusReport.TotalRowCount -gt $itemsFetched);
Write-Output "Writing to File $OutputPath"
$AgentStatusCollection | Export-Csv -NoTypeInformation -Path $OutputPath
Write-Output "Total Time Taken: " $totalTime
# SIG # Begin signature block
# MIIjewYJKoZIhvcNAQcCoIIjbDCCI2gCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA6zc1pOZXfqYHq
# omWdteSqZLZ+AgXxsu3WbOUC+Uw2g6CCDXYwggX0MIID3KADAgECAhMzAAAB3vl+
# gOdHKPWkAAAAAAHeMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD
# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p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nxd5ibTggLIffkCcMxE2GM5+Erf0Wc0v2Y8C+UoBRR4LB8aSv591GObK919diMm
# Hu/h/2x7/UMeC4fZ70DK7nc33lOYEzVdfDxFRKwwmAIvkP4WPamizr7PnJ5H2lu9
# 4SCGfm7RMn+XAFqe+ol2OSmfzrExfuXL4xOJy+QXPZRB2j2dxIXpO5hdglr600wo
# o5soT3xOwS+4ymHi97Kk0/NOF1v5Ora3vPAzr4b/37Lkfai53jpt+tTSM3R9gneN
# Udj2vUyG2dhHw+ojQRxxbQSEnFyen8uRDjng8KDs+jt015Jzp2SbI7BcHaxQK6tG
# sNxjWU75HfLYta5R8HxR
# SIG # End signature block

Просмотреть файл

@ -0,0 +1,36 @@
# Overview
This Powershell tool allows admins to export Unhealthy endpoint with Product Status in understandable format instead of Flags enum:
# Dependencies
The tool will install 'Intune Powershell SDK' from Powershell Gallery if it is not already installed.
# Export Unhealthy endpoint report to CSV format with ProductStatus in understandable format.
``` Powershell
NAME
Export-AgentStatusOpsReportExpandedProductStatus.ps1
SYNOPSIS
Export-AgentStatusOpsReportWithProductStatusDescription - Exports the AgentStatusOpsReport which ProductStatus in descriptive format.
It takes output path for the csv as parameter.
SYNTAX
.\Export-AgentStatusOpsReportExpandedProductStatus.ps1 [-OutputPath] <String>
DESCRIPTION
Exports the AgentStatusOpsReport which ProductStatus Description
PARAMETERS
-TenantAdminUPN <String>
-------------------------- EXAMPLE 1 --------------------------
PS C:\GitHub>.\Export-AgentStatusOpsReportExpandedProductStatus.ps1 -OutputPath .\Report.csv
```