Skip to content

Instantly share code, notes, and snippets.

View alexverboon's full-sized avatar

Alex Verboon alexverboon

View GitHub Profile
@alexverboon
alexverboon / connect-exomfa.ps1
Created July 15, 2019 10:28
Connect to Exchange Online with MFA
# connect to EXO with MFA
$CreateEXOPSSession = (Get-ChildItem -Path $env:userprofile -Filter CreateExoPSSession.ps1 -Recurse -ErrorAction SilentlyContinue -Force | Select -Last 1).DirectoryName
. "$CreateEXOPSSession\CreateExoPSSession.ps1"
@alexverboon
alexverboon / Verify-MScoreHostedOutboundSpamFilterPolicy.ps1
Created July 15, 2019 10:33
Verify-MScoreHostedOutboundSpamFilterPolicy
function Verify-MScoreHostedOutboundSpamFilterPolicy
{
<#
.Synopsis
Verify-MScoreHostedOutboundSpamFilterPolicy
.DESCRIPTION
The Verify-MScoreHostedOutboundSpamFilterPolicy cmdlet verifies the configuation
of the outbound spam policy
@alexverboon
alexverboon / Start-OfficeReadinessCollection.ps1
Created August 19, 2019 10:39
Start-OfficeReadinessCollection
function Start-OfficeReadinessCollection
{
<#
.Synopsis
Start-OfficeReadinessCollection
.DESCRIPTION
Start-OfficeReadinessCollection is a wrapper script for the Readiness Toolkit for Office add-ins and VBA
.PARAMETER OutPutPath
Specifies the path where the Office Readiness Assessment results are stored.
@alexverboon
alexverboon / Export-CMScriptResults.ps1
Last active May 9, 2023 15:04
Export-CMScriptResults
Function Export-CMScriptResults
{
<#
.Synopsis
Export-CMScriptResults
.DESCRIPTION
Export-CMScriptResults exports the return values from scripts that are executed
through the ConfigMgr Run Script feature.
.PARAMETER ScriptName
The name of the Script as it is displayed within the ConfigMgr Console.
@alexverboon
alexverboon / Get-UserProfileSize.ps1
Created September 9, 2019 17:28
Get-UserProfileSize
<#
.Synopsis
Get-UserProfileSize
.DESCRIPTION
Get-UserProfileSize retrieves the profile size information of each locally stored profile. The command retrieves the
size of the profile Document and Desktop folder and the full profile size but excluding the AppData\local folder
.EXAMPLE
Get-UserProfileSize -OutPutLocation C:\Temp -Verbose
@alexverboon
alexverboon / Import-SecurityBaselineGPO.ps1
Created October 7, 2019 18:57
Import-SecurityBaselineGPO
function Import-SecurityBaselineGPO
<#
.Synopsis
Import-SecurityBaselineGPO
.DESCRIPTION
Import-SecurityBaselineGPO
.PARAMETER GPOBackupPath
The path that constains the Security baselines GPO backup
.EXAMPLE
@alexverboon
alexverboon / Test-EnvPathHealth.ps1
Created November 2, 2019 12:32
Test-EnvPathHealth
function Test-EnvPathHealth
{
<#
.Synopsis
Test-EnvPathHealth
.DESCRIPTION
Test-EnvPathHealth tests if the paths defined within the %PATH% environment variable
exist.
.PARAMETER Writable
@alexverboon
alexverboon / TVMMonthly.kql
Last active June 15, 2023 14:49
TVMMonthly.kql
// code used in https://www.verboon.info/2019/11/how-to-generate-a-monthly-defender-atp-threat-and-vulnerability-report/
DeviceTvmSoftwareInventoryVulnerabilities
| project DeviceName, SoftwareName, CveId, SoftwareVersion, VulnerabilitySeverityLevel
| join (DeviceTvmSoftwareVulnerabilitiesKB
| project AffectedSoftware, VulnerabilityDescription , CveId , CvssScore , IsExploitAvailable
)
on CveId
| project CveId , SoftwareName , SoftwareVersion , VulnerabilityDescription , VulnerabilitySeverityLevel, IsExploitAvailable , CvssScore
| distinct SoftwareName , SoftwareVersion, CveId, VulnerabilityDescription , VulnerabilitySeverityLevel, IsExploitAvailable
| sort by SoftwareName asc , SoftwareVersion
@alexverboon
alexverboon / Get-ADSysVolPolicyFolders.ps1
Created November 19, 2019 21:34
Get-ADSysVolPolicyFolders
function Get-ADSysVolPolicyFolders
{
<#
.Synopsis
Verify-ADSysVolPolicyFolders
.DESCRIPTION
Get-ADSysVolPolicyFolders retrieves all the folders within the SYSVOL\Policies folder and checks
whether it belongs to an existing Group Policy object.
Use this script to identify orphan group policy content folders that can be removed.
@alexverboon
alexverboon / GpoDump.ps1
Created December 4, 2019 19:39
GPODump
# Prepare Folder Structure"
If (-not (Test-Path -Path "C:\TEMP\GPO" -PathType Container ))
{
New-Item -Path "C:\TEMP\GPO" -ItemType "Directory"
New-Item -Path "C:\TEMP\GPO\Backup" -ItemType "Directory"
New-Item -Path "C:\TEMP\GPO\Reports" -ItemType "Directory"
}
Else
{