Skip to content

Instantly share code, notes, and snippets.

View Dalmirog-zz's full-sized avatar

Dalmiro Granas Dalmirog-zz

View GitHub Profile
$usernameToFind = "ITARI\Administrator"
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
$contextType = [System.DirectoryServices.AccountManagement.ContextType]::Domain
$context = New-Object System.DirectoryServices.AccountManagement.PrincipalContext -argumentlist ($contextType)
$user = [System.DirectoryServices.AccountManagement.UserPrincipal]::FindByIdentity($context, $usernameToFind)
Write-Output $user
@Damovisa
Damovisa / gist:34ef3a589a63f687281e
Last active December 16, 2015 23:57
Octopus Deploy Raven Export Script
# Raven Export Script
# You'll need a copy of Raven.Abstractions.dll, Raven.Client.Lightweight.dll,
# Microsoft.CompilerServices.AsyncTargetingPack.Net4.dll, and Raven.Smuggler.exe in a lib folder
# under the location of this script. You can find them in the folder where Octopus Deploy is installed.
[CmdletBinding()]
Param(
[Parameter(Mandatory=$false,Position=1)]
[string]$exportPath = ".\dump.raven",