This file contains hidden or 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
#!/usr/bin/env bash | |
CORTEX_CRYPTO="aes-256-cbc" | |
_cortex_logger() { printf '{%s}[%s](%s):%s\t%s\n' "$(date -u '+%FT%TZ')" "${1}" "$(caller)" "${2}" "${@:3}" 1>&2; } | |
_cortex_io() { | |
case "${CORTEX_FILE}" in | |
"") _cortex_logger "$(caller)" ERR "CORTEX_FILE environment variable is empty/unset" && return 127 ;; | |
*) |
This file contains hidden or 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
function Compare-ObjectEquivalence { | |
[CmdletBinding(DefaultParameterSetName='Deserialized')] | |
param( | |
[Parameter(Position=0, Mandatory=$true)] | |
[ValidateNotNull()] | |
[System.Object] | |
$OriginalObject, | |
[Parameter(Position=1, Mandatory=$true, ParameterSetName='Deserialized')] | |
[ValidateNotNull()] |
This file contains hidden or 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
<# | |
.Synopsis | |
Rough PS functions to create new user profiles | |
.DESCRIPTION | |
Call the Create-NewProfile function directly to create a new profile | |
.EXAMPLE | |
Create-NewProfile -Username 'testUser1' -Password 'testUser1' | |
.NOTES | |
Created by: Josh Rickard (@MS_dministrator) and Thom Schumacher (@driberif) |
This file contains hidden or 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
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); | |
} |
This file contains hidden or 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
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' | |
#http://www.codeproject.com/Articles/990131/CRUD-Operation-to-List-Using-SharePoint-Rest-API | |
#https://msdn.microsoft.com/en-us/library/office/fp142380. | |
#http://paulryan.com.au/2013/odata-in-sharepoint/ | |
#https://wmostafaw.wordpress.com/2012/11/17/odata-in-sharepoint-2013-lists-and-items/ | |
#http://blogs.msdn.com/b/uksharepoint/archive/2013/02/22/manipulating-list-items-in-sharepoint-hosted-apps-using-the-rest-api.aspx | |
#http://www.odata.org/getting-started/basic-tutorial/ | |