Skip to content

Instantly share code, notes, and snippets.

crshnbrn66 / Compare-ObjectEquivalence.ps1
Created Jun 6, 2017 — forked from KirkMunro/Compare-ObjectEquivalence.ps1
A function that facilitates comparison of serialized objects with their deserialized or selected equivalent
View Compare-ObjectEquivalence.ps1
function Compare-ObjectEquivalence {
[Parameter(Position=0, Mandatory=$true)]
[Parameter(Position=1, Mandatory=$true, ParameterSetName='Deserialized')]
crshnbrn66 / user-profile.psm1
Last active Sep 24, 2021 — forked from MSAdministrator/Create-NewProfile.ps1
PowerShell functions to create a new user profile
View user-profile.psm1
Rough PS functions to create new user profiles
Call the Create-NewProfile function directly to create a new profile
Create-NewProfile -Username 'testUser1' -Password 'testUser1'
Created by: Josh Rickard (@MS_dministrator) and Thom Schumacher (@driberif)
View CreateProfile.ps1
function CreateProfile
param([String]$UserSid, [String]$UserName, [system.uint32]$ProfilePath)
Add-Type -TypeDefinition '
using System;
using System.Runtime.InteropServices;
public static class PInvoke {
[DllImport("userenv.dll", SetLastError = true, CharSet = CharSet.Auto)]
public static extern int CreateProfile( [MarshalAs(UnmanagedType.LPWStr)] String pszUserSid, [MarshalAs(UnmanagedType.LPWStr)] String pszUserName, [Out, MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder pszProfilePath, uint cchProfilePath);
crshnbrn66 / Invoke-RestSPO.ps1
Last active Jul 3, 2018 — forked from vgrem/Invoke-RestSPO.ps1
SharePoint Online REST request
View Invoke-RestSPO.ps1
Add-Type –Path 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll'
Add-Type –Path 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll'