Skip to content

Instantly share code, notes, and snippets.

View General-Gouda's full-sized avatar

Matt Marchese General-Gouda

  • Grand Rapids, MI
View GitHub Profile
@General-Gouda
General-Gouda / New-FlattenSPFRecord.ps1
Created August 2, 2019 13:59
SPF Record Flattener
[CmdletBinding()]
param
(
[string]$DNSServer = "8.8.8.8",
[string]$DomainName = "domain.com",
[parameter(Mandatory=$true)]
[AllowNull()]
[AllowEmptyString()]
@General-Gouda
General-Gouda / HideShowPowershell.ps1
Last active September 20, 2017 12:58
Commands to hide or show a PowerShell console window.
function Show-PowerShell() {
$null = $showWindowAsync::ShowWindowAsync((Get-Process –id $pid).MainWindowHandle, 10)
}
function Hide-PowerShell() {
$null = $showWindowAsync::ShowWindowAsync((Get-Process –id $pid).MainWindowHandle, 2)
}
$script:showWindowAsync = Add-Type –memberDefinition @”
[DllImport("user32.dll")]
@General-Gouda
General-Gouda / AzCopy_IndvPST.ps1
Created July 31, 2017 16:10
Individual PST Upload Script
function AzCopy_PSTs {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true)]
[string]$Environment,
[Parameter(Mandatory=$false)]
[string]$IndividualUserName,
[Parameter(Mandatory=$true)]
@General-Gouda
General-Gouda / Encryption.ps1
Last active December 8, 2020 15:31
Encryption helper cmdlets
#----------------------------------------------------#
# Decrypts password using Certificate
#----------------------------------------------------#
function Get-DecryptedPassword
{
[CmdletBinding()]
param
(
$EncryptedPassword,
$EncryptedKey,
@General-Gouda
General-Gouda / ADSIToCSV.ps1
Last active April 7, 2017 19:07
ADSI to CSV
Import-Module ActiveDirectory
$MeGroups = Get-ADGroup -Filter {Mail -like "*"} -Properties Mail,Members,msExchHideFromAddressLists | Where-Object {$_.msExchHideFromAddressLists -ne $true}
Write-Host "There are" $MeGroups.Count "mail enabled groups (Security & Distribution)"
ForEach ($Group in $MeGroups) {
$GroupDN = $Group.DistinguishedName