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 Get-GpoBackupName { | |
[CmdletBinding()] | |
param ( | |
[Parameter(ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] | |
[Alias('FullName')] | |
[string] | |
$Path | |
) | |
process { | |
foreach ($folder in $Path) { |
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 ConvertTo-TrustObject { | |
<# | |
.SYNOPSIS | |
Converts an AD Object for a trust object and parses it into humanly useful information. | |
.DESCRIPTION | |
Converts an AD Object for a trust object and parses it into humanly useful information. | |
This includes encryption settings and parsing the numeric values of the trust attributes. | |
.PARAMETER Trust |
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 Invoke-SystemCommand { | |
<# | |
.SYNOPSIS | |
Execute a scriptblock as SYSTEM by setting up a temporary scheduled task. | |
.DESCRIPTION | |
Execute a scriptblock as SYSTEM by setting up a temporary scheduled task. | |
.PARAMETER Name | |
The name of the task |
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 | |
A script to transfer modules from one repository to another while codesigning them. | |
.DESCRIPTION | |
Script intended for use in a code-signing pipeline: | |
It will scan source and destination repository and for each missing (or lower version) module will: | |
- Download the module from the source repository | |
- Sign all code from that module with the specified certificate retrieved from certificate store. | |
- Publish the module to the destination store |
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 | |
Scans an Active Directory domain's and its principal's kerberos encryption configuration. | |
.DESCRIPTION | |
Scans an Active Directory domain's and its principal's kerberos encryption configuration. | |
It will generate all data via LDAP, and analyze the results for possible authentication issues. | |
It supports three ways to report: | |
- Print: Write analysis of results to screen |
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 Get-LdapObject { | |
<# | |
.SYNOPSIS | |
Use LDAP to search in Active Directory | |
.DESCRIPTION | |
Utilizes LDAP to perform swift and efficient LDAP Queries. | |
.PARAMETER LdapFilter |
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 Get-ServiceAccess { | |
<# | |
.SYNOPSIS | |
Returns windows service security information from registry | |
.DESCRIPTION | |
Returns windows service security information from registry. | |
This allows finding services that have been hidden from SCM through a deny rule. | |
Triggered by this thread on Twitter: |
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 Connect-ClientSecret { | |
<# | |
.SYNOPSIS | |
Connects to AzureAD using a client secret. | |
.DESCRIPTION | |
Connects to AzureAD using a client secret. | |
.PARAMETER ClientID | |
The ID of the registered app used with this authentication request. |
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 Connect-DeviceCode { | |
<# | |
.SYNOPSIS | |
Connects to Azure AD using the Device Code authentication workflow. | |
.DESCRIPTION | |
Connects to Azure AD using the Device Code authentication workflow. | |
.PARAMETER ClientID | |
The ID of the registered app used with this authentication request. |
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 Test-ClmCompatibility { | |
<# | |
.SYNOPSIS | |
Tests, whether the targeted file would have trouble executing under Constrained Language Mode. | |
.DESCRIPTION | |
Tests, whether the targeted file would have trouble executing under Constrained Language Mode (CLM). | |
In CLM, various language features and commands are constrained in their ability to execute. | |
This command uses the AST parser to scan for as many known issues as possible and gives a comprehensive report for concerns found. |