A small collection specialised scripts for Active Directory.
Includes:
- Compare-ADMemberOf
- Get-ADSystemInfo
- Get-GroupMemberTree
- Get-LdapObject
- Get-MemberOfTree
- Test-LdapSslConnection
USE [SSISDB] | |
GO | |
/** | |
.SYNOPSIS | |
Modified version of catalog.create_execution SP. | |
.DESCRIPTION | |
I created new version of catalog.create_execution SP to reslove the execution timed out error. | |
Permission check logic is not included. However, everything else is the same. | |
Works for 2012 and higher | |
.EXAMPLE |
<# | |
.SYNOPSIS | |
Optimizes your PSReadline history save file. | |
.DESCRIPTION | |
Optimizes your PSReadline history save file by removing duplicate | |
entries and optionally removing commands that are not longer than | |
a minimum length | |
.EXAMPLE | |
C:\PS> Optimize-PSReadlineHistory | |
Removes all the duplicate commands. |
A small collection specialised scripts for Active Directory.
Includes:
function Get-KerberosTicketGrantingTicket | |
{ | |
<# | |
.SYNOPSIS | |
Gets the Kerberos Tickets Granting Tickets from all Logon Sessions | |
.DESCRIPTION | |
Get-KerberosTicketGrantingTicket uses the Local Security Authority (LSA) functions to enumerate Kerberos logon sessions and return their associate Kerberos Ticket Granting Tickets. |
function ConvertTo-Object { | |
param( | |
[Parameter(Mandatory=$true,ValueFromPipeline=$true)] | |
[AllowEmptyString()] | |
[string[]]$InputString, | |
[Parameter(Mandatory=$true,ValueFromRemainingArguments=$true)] | |
[string[]]$Pattern | |
) |
function Enter-PSSessionWithEdit { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string] $ComputerName | |
) | |
end { | |
$enterEventName = 'RemoteSessionEditor.Enter' | |
if (-not $Host.Runspace.Events.GetEventSubscribers($enterEventName)) { |
#Requires -Version 7 | |
# Version 1.2.13 | |
# check if newer version | |
$gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e" | |
$latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version') | |
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)" | |
if ([System.IO.File]::Exists($latestVersionFile)) { |
function Get-ArgumentCompleter { | |
<# | |
.SYNOPSIS | |
Get custom argument completers registered in the current session. | |
.DESCRIPTION | |
Get custom argument completers registered in the current session. | |
By default Get-ArgumentCompleter lists all of the completers registered in the session. | |
.EXAMPLE | |
Get-ArgumentCompleter |
#requires -module msterminalsettings,threadjob | |
###QUICKSTART | |
#FIRST: Run this in your Powershell Windows Terminal: Install-Module threadjob,msterminalsettings -scope currentuser | |
#THEN: iex (iwr git.io/invoketerminalgif) | |
#THEN: Get-Help Search-Giphy -Examples | |
#THEN: Get-Help Invoke-TerminalGif -Examples | |
#THEN: Search-Giphy | Format-List -prop * | |
#THEN: Invoke-TerminalGif https://media.giphy.com/media/g9582DNuQppxC/giphy.gif |