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
$fqdn = ([System.Net.Dns]::GetHostByName($env:computerName)).HostName |
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
Install-Module ExchangeOnlineManagement | |
Install-Module AIPService | |
Connect-ExchangeOnline | |
Connect-AIPService | |
Enable-AIPService | |
$licenseURL = (Get-AipServiceConfiguration).LicensingIntranetDistributionPointUrl | |
$irmConfig = Get-IRMConfiguration | |
$list = $irmConfig.LicensingLocation |
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
<# | |
.NET Framework version | Minimum value | |
.NET Framework 4.5 | 378389 | |
.NET Framework 4.5.1 | 378675 | |
.NET Framework 4.5.2 | 379893 | |
.NET Framework 4.6 | 393295 | |
.NET Framework 4.6.1 | 394254 | |
.NET Framework 4.6.2 | 394802 | |
.NET Framework 4.7 | 460798 | |
.NET Framework 4.7.1 | 461308 |
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
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force |
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
<# | |
This script fixes the file permissions so that members of $adminGroup can access the redirected | |
folders of users. It also ensures that the users remain the owners of their own folders so that | |
folder redirection does not break. | |
PRO TIP: Make an explicit group to access the folders. DO NOT use a built-in group like Domain Admins or Administrators. | |
Taken from jonahzona on Spiceworks forum. All I did was clean up the formatting and change the variable names. | |
https://community.spiceworks.com/topic/1948116-domain-admins-can-not-access-folders-used-for-folder-redirection | |
#> |
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
# Where to output the Html and Xml reports | |
$reportDirectory = 'C:\path\to\GPO\Reports' | |
# Create $reportDirectory if it does not exist | |
if (-not $(Test-Path $reportDirectory)) { | |
New-Item -Path "$reportDirectory" -ItemType Directory -Force | |
} | |
# Create one report that contains all GPOs in it | |
Get-GPOReport -All -ReportType Html -Path "$($reportDirectory)\_All-GPOs.html" |
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
$domainRoles= Get-ADDomain | Select-Object InfrastructureMaster, RIDMaster, PDCEmulator | |
$forestRoles = Get-ADForest | Select-Object DomainNamingMaster, SchemaMaster | |
$fsmoRoles = New-Object -TypeName psobject | |
$fsmoRoles | Add-Member -NotePropertyName 'InfrastructureMaster' -NotePropertyValue $($domainRoles.InfrastructureMaster) | |
$fsmoRoles | Add-Member -NotePropertyName 'RIDMaster' -NotePropertyValue $($domainRoles.RIDMaster) | |
$fsmoRoles | Add-Member -NotePropertyName 'PDCEmulator' -NotePropertyValue $($domainRoles.PDCEmulator) | |
$fsmoRoles | Add-Member -NotePropertyName 'DomainNamingMaster' -NotePropertyValue $($forestRoles.DomainNamingMaster) | |
$fsmoRoles | Add-Member -NotePropertyName 'SchemaMaster' -NotePropertyValue $($forestRoles.SchemaMaster) |
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
# The #!ps is for pasting into Connectwise Control. You don't need it otherwise. | |
#!ps | |
function killProcess { | |
param ( | |
[Parameter(Mandatory = $true)] | |
$thisProcess | |
) | |
try { | |
Stop-Process -Name $thisProcess -Force -Confirm:$false |
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
# Quarantines any emails using $blockedCharsets | |
# Supported charsets: https://docs.microsoft.com/en-us/exchange/mail-flow-best-practices/remote-domains/supported-character-sets | |
$allowedCharsets = @('UTF-8','US-ASCII','ISO-8859-1','WINDOWS-1252') | |
$blockedCharsetWords = @('big5','euc','gb','iso','koi','ks','ns','sen','shift','windows') | |
New-TransportRule -Name "Block Abnormal Charsets" -ContentCharacterSetContainsWords $blockedCharsetWords -ExceptIfContentCharacterSetContainsWords $allowedCharsets -Quarantine $true -Priority 0 |
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
#!ps | |
# The #!ps is for pasting into Connectwise Control. You don't need it otherwise. | |
function killProcess { | |
param ( | |
[Parameter(Mandatory = $true)] | |
$thisProcess | |
) | |
try { | |
Stop-Process -Name $thisProcess -Force -Confirm:$false |
NewerOlder