This file contains 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 | |
Creates an custom ErrorRecord that can be used to report a terminating or non-terminating error. | |
.Description | |
Creates an custom ErrorRecord that can be used to report a terminating or non-terminating error. | |
.Parameter Exception | |
The Exception that will be associated with the ErrorRecord. | |
This file contains 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
<# | |
Prerequisites: PowerShell v5.1 and above (verified; may also work in earlier versions) | |
License: MIT | |
Author: Michael Klement <mklement0@gmail.com> | |
DOWNLOAD and DEFINITION OF THE FUNCTION: | |
irm https://gist.github.com/mklement0/7f2f1e13ac9c2afaf0a0906d08b392d1/raw/Debug-String.ps1 | iex |
This file contains 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 Set-WindowState { | |
<# | |
.LINK | |
https://gist.github.com/Nora-Ballard/11240204 | |
#> | |
[CmdletBinding(DefaultParameterSetName = 'InputObject')] | |
param( | |
[Parameter(Position = 0, Mandatory = $true, ValueFromPipeline = $true)] | |
[Object[]] $InputObject, |
This file contains 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
<# | |
Prerequisites: PowerShell v5.1 and above (verified; may also work in earlier versions) | |
License: MIT | |
Author: Michael Klement <mklement0@gmail.com> | |
DOWNLOAD and DEFINITION OF THE FUNCTION: | |
irm https://gist.github.com/mklement0/9e1f13978620b09ab2d15da5535d1b27/raw/Time-Command.ps1 | iex |
This file contains 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
using module ActiveDirectory | |
using namespace System.Reflection | |
function Convert-ADFilter { | |
<# | |
.SYNOPSIS | |
Converts PowerShell-style filters used by the AD module into LDAP filters. | |
.DESCRIPTION | |
Convert-ADFilter uses the QueryParser from the AD module to convert PowerShell-style filters into LDAP |