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. https://onename.com/aaronparker
$Cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $Cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
Set-OrganizationConfig -OAuth2ClientProfileEnabled $true
$Cred = Get-Credential
$session = New-CsOnlineSession -Credential $cred -Verbose -OverrideAdminDomain home.stealthpuppy.com
Import-PSSession $Session
Set-CsOAuthConfiguration -ClientAdalAuthOverride Allowed
@aaronparker
aaronparker / New-SecureSharedFolder.cmd
Created July 26, 2017 10:27
Create Secure Shared Folders
@ECHO OFF
REM Creating secure shared folders
REM Sample articles:
REM https://support.microsoft.com/en-us/help/274443/how-to-dynamically-create-security-enhanced-redirected-folders-by-using-folder-redirection-in-windows-2000-and-in-windows-server-2003
REM https://technet.microsoft.com/en-us/library/jj649078(v=ws.11).aspx
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
@aaronparker
aaronparker / IvantiApplicationControlMessageBox.css
Last active May 17, 2018 02:55
Ivanti Application Control Message Box styling
body{
font-family:'Segoe UI','Regular';
background-color:#E6E6E6;
color:#000;
font-size:11pt;
margin:0px;
padding:0px;
overflow:hidden;
}
.header,.description,.confirm-btn{
@aaronparker
aaronparker / Redirect-FoldersOneDrive.ps1
Last active July 13, 2023 20:54
Redirects select folders into the OneDrive folder.
<#
.SYNOPSIS
Sets a known folder's path using SHSetKnownFolderPath.
.PARAMETER KnownFolder
The known folder whose path to set.
.PARAMETER Path
The target path to redirect the folder to.
.NOTES
Forked from: https://gist.github.com/semenko/49a28675e4aae5c8be49b83960877ac5
#>
@aaronparker
aaronparker / Set-RedirectOneDriveTask.ps1
Last active July 21, 2021 13:51
Creates a scheduled task to redirect folders into the OneDrive sync folder at logon
<#
.SYNOPSIS
Creates a scheduled task to enable folder redirection into OneDrive
#>
# Variables
$Url = "https://gist.githubusercontent.com/aaronparker/cf124f13bb58d95342707527900d307b/raw/e4683d9bf95c5ac77c6d2d43b5f2454185cf1e55/Redirect-FoldersOneDrive.ps1"
$Target = "$env:ProgramData\Scripts"
$Script = "Redirect-FoldersOneDrive.ps1"
@aaronparker
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 {
<#
.SYNOPSIS
Returns an array of items and properties from an Azure blog storage URL.
.DESCRIPTION
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
aaronparker / Get-DigitalSignatures.ps1
Last active August 21, 2019 06:27
Get digital signatures from files in a target folder.
<#
.SYNOPSIS
Get digital signatures from files in a target folder.
.DESCRIPTION
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.
.NOTES
@aaronparker
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
Connect-MsolService
# Get specific user accounts
Get-MsolUser -UserPrincipalName "bill.murray@stealthpuppy.com"
# Get license SKUs
Get-MsolAccountSku
# EMS licenses