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 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 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 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. |
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 Grant-FSPermission { | |
| <# | |
| .SYNOPSIS | |
| Helper tool to simplify file system permission assignments. | |
| .DESCRIPTION | |
| Helper tool to simplify file system permission assignments. | |
| Allows bulk-updating / assigning permissions. | |
| .PARAMETER Identity |
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 Write-EventLogEntry | |
| { | |
| <# | |
| .SYNOPSIS | |
| Write an eventlog entry | |
| .DESCRIPTION | |
| Write an eventlog entry | |
| .PARAMETER LogName |
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 New-Password | |
| { | |
| <# | |
| .SYNOPSIS | |
| Generate a new, complex password. | |
| .DESCRIPTION | |
| Generate a new, complex password. | |
| .PARAMETER Length |
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 Test-PrintNightmareVulnerability { | |
| <# | |
| .SYNOPSIS | |
| Tests whether the target system is vulnerable to the PrintNightmare vulnerability. | |
| .DESCRIPTION | |
| Tests whether the target system is vulnerable to the PrintNightmare vulnerability. | |
| Uses PowerShell remoting. | |
| This checks whether vulnerable GPO/registry settings are applied. |
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 Show-SaveFileDialog { | |
| [CmdletBinding()] | |
| param ( | |
| [string] | |
| $InitialDirectory = '.', | |
| [string] | |
| $Filter = '*.*', | |
| $Filename |
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 Show-OpenFileDialog { | |
| <# | |
| .SYNOPSIS | |
| Show an Open File dialog using WinForms. | |
| .DESCRIPTION | |
| Show an Open File dialog using WinForms. | |
| .PARAMETER InitialDirectory | |
| The initial directory from which the user gets to pick a file. |
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 Get-UserInput { | |
| <# | |
| .SYNOPSIS | |
| Asks for user input, then validates response. | |
| .DESCRIPTION | |
| Asks for user input, then validates response. | |
| .PARAMETER Prompt | |
| The message to show to the user as input prompt. |
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 Test-TlsProtocol { | |
| <# | |
| .SYNOPSIS | |
| A quick helper function to test supported TLS protocols | |
| .DESCRIPTION | |
| A quick helper function to test supported TLS protocols | |
| .PARAMETER ComputerName | |
| The hosts to check. |