Skip to content

Instantly share code, notes, and snippets.

View aaronparker's full-sized avatar

Aaron Parker aaronparker

View GitHub Profile
Verifying that +aaronparker is my blockchain ID.
$Cred = Get-Credential
$session = New-CsOnlineSession -Credential $cred -Verbose -OverrideAdminDomain
Import-PSSession $Session
Set-CsOAuthConfiguration -ClientAdalAuthOverride Allowed
aaronparker / IvantiApplicationControlMessageBox.css
Last active May 17, 2018 02:55
Ivanti Application Control Message Box styling
font-family:'Segoe UI','Regular';
aaronparker / Switch-EmsLicenses.ps1
Created December 1, 2018 12:32
Find users registered in Intune with EMS E3 and replace with EMS E5 licenses
# Connect to Office 365
# Get specific user accounts
Get-MsolUser -UserPrincipalName ""
# Get license SKUs
# EMS licenses
aaronparker / Disable-AzureADUserPasswordExpiration.ps1
Last active February 9, 2019 10:45
Disable password expiration for an individual Azure AD account
# Install the Azure AD module and log into Azure AD
Install-Module AzureADPreview
# Get details of the specific account
$user = Get-AzureADUser -SearchString ""
# View password policy on the acccount
$user | Select-Object @{N = "PasswordNeverExpires"; E = {$_.PasswordPolicies -contains "DisablePasswordExpiration"}}
aaronparker / Get-AzureBlobItems.ps1
Last active May 13, 2019 00:59
Get-AzureBlobItems function to return an array from a list of files in an Azure blob storage container.
Function Get-AzureBlobItems {
Returns an array of items and properties from an Azure blog storage URL.
Queries an Azure blog storage URL and returns an array with properties of files in a Container.
Requires Public access level of anonymous read access to the blob storage container.
Works with PowerShell Core.
aaronparker / Get-DigitalSignatures.ps1
Last active August 21, 2019 06:27
Get digital signatures from files in a target folder.
Get digital signatures from files in a target folder.
Gets digital signatures from .exe and .dll files from a specified path and sub-folders.
Retreives the certificate thumbprint, certificate name, certificate expiry, certificate validity and file path and outputs the results.
Output includes files that are not signed.
aaronparker / New-SecureSharedFolder.cmd
Created July 26, 2017 10:27
Create Secure Shared Folders
REM Creating secure shared folders
REM Sample articles:
REM Create and share folders with permissions for FSLogix Profile Containers or Office 365 Containers
md e:\FSLogixContainers
net share FSLogixContainers=e:\FSLogixContainers /GRANT:Users,CHANGE /GRANT:Administrators,FULL /CACHE:None /REMARK:"FSLogix Containers"
icacls e:\FSLogixContainers /inheritance:d
$Cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $Cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Set-OrganizationConfig -OAuth2ClientProfileEnabled $true
aaronparker / Expand-GzipArchive.ps1
Last active April 10, 2021 13:36
Expand a Gzip file with PowerShell
Function Expand-GzipArchive {
[CmdletBinding(SupportsShouldProcess = $False)]
param (
[Parameter(Mandatory = $True, Position = 0)]
[ValidateScript( { If (Test-Path -Path $_ -PathType "Leaf") { $True } Else { Throw "Cannot find path $_." } })]
[System.String] $Path,
[Parameter(Mandatory = $False, Position = 1)]