This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ApplicationId = 'YourApplicationID' | |
$ApplicationSecret = 'YourApplicationSecret' | Convertto-SecureString -AsPlainText -Force | |
$TenantID = 'YourTenantID' | |
$ExchangeRefreshToken = 'YourExchangeToken' | |
$RefreshToken = 'YourRefreshToken' | |
$UPN = "UPN-Used-To-Generate-Token" | |
############################## | |
$credential = New-Object System.Management.Automation.PSCredential($ApplicationId, $ApplicationSecret) | |
$aadGraphToken = New-PartnerAccessToken -ApplicationId $ApplicationId -Credential $credential -RefreshToken $refreshToken -Scopes 'https://graph.windows.net/.default' -ServicePrincipal -Tenant $tenantID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REG DELETE HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU /va /f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get-mailbox | Select DisplayName,UserPrincipalName,HasPicture | Export-Csv C:\photostatus.csv -nti |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-AppXPackage | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-InstalledModule | Update-Module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Report = @() | |
$i = 0 | |
$Accounts = (Get-MsolUser -All | ? {$_.StrongAuthenticationMethods -ne $Null} | Sort DisplayName) | |
ForEach ($Account in $Accounts) { | |
Write-Host "Processing" $Account.DisplayName | |
$i++ | |
$Methods = $Account | Select -ExpandProperty StrongAuthenticationMethods | |
$MFA = $Account | Select -ExpandProperty StrongAuthenticationUserDetails | |
$State = $Account | Select -ExpandProperty StrongAuthenticationRequirements | |
$Methods | ForEach { If ($_.IsDefault -eq $True) {$Method = $_.MethodType}} |
NewerOlder