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
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
// PROSPERO | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{993855ad-b0eb-4f3d-8370-1a8d5b53abb5}", | |
// Launch Settings | |
"initialCols": 135, | |
"initialRows": 35, | |
// You can add more global application settings here. |
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
<# | |
This is old code that still works in Windows PowerShell | |
as a temporary event subscriber for Active Directory events. | |
#> | |
Function Get-WmiADEvent { | |
Param([string]$query) | |
$path="root\directory\ldap" | |
$EventQuery = New-Object System.Management.WQLEventQuery $query | |
$scope = New-Object System.Management.ManagementScope $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
#requires -version 5.1 | |
#requires -module ActiveDirectory,DNSClient | |
# https://jdhitsolutions.com/blog/powershell/8087/an-active-directory-change-report-from-powershell/ | |
#Reporting on deleted items requires the Active Directory Recycle Bin feature | |
[cmdletbinding()] | |
Param( | |
[Parameter(Position = 0,HelpMessage = "Enter a last modified datetime for AD objects. The default is the last 4 hours.")] | |
[ValidateNotNullOrEmpty()] |
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
#requires -version 5.1 | |
#requires -module ActiveDirectory | |
# Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/ | |
Function Get-ADChange { | |
[cmdletbinding()] | |
[outputtype("ADChange")] | |
[alias("gadc")] |
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
#requires -version 5.1 | |
#requires -module ActiveDirectory | |
#you might need to increase the size of the Security eventlog | |
# limit-eventlog -LogName security -ComputerName dom2,dom1 -MaximumSize 1024MB | |
Function Get-ADUserAudit { | |
[cmdletbinding()] | |
Param( | |
[Parameter(Position=0,HelpMessage = "Specify one or more domain controllers to query.")] |
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
#requires -version 5.1 | |
#requires -module CIMCmdlets | |
Function Get-PSPowerShell { | |
<# | |
.Synopsis | |
Get all PowerShell processes. | |
.Description | |
Get all PowerShell or pwsh processes on your computer. The command will default | |
to the same PowerShell process as your console, but you can specify either one. |
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
#requires -version 5.1 | |
Function Get-EventCountdown { | |
[cmdletbinding()] | |
[OutputType("PSCountdown")] | |
Param( | |
[Parameter(Position=0,Mandatory,ValueFromPipeline,ValueFromPipelineByPropertyName,HelpMessage = "Enter the event date and time.")] | |
[ValidateNotNullOrEmpty()] | |
[ValidateScript({ | |
if ($_ -ge (Get-Date)) { |
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-Restart { | |
[cmdletbinding()] | |
[outputtype("RestartEvent")] | |
Param( | |
[Parameter(Position = 0, ValueFromPipeline)] | |
[ValidateNotNullOrEmpty()] | |
[Alias("CN")] | |
[string]$Computername = $env:COMPUTERNAME, | |
[Parameter(HelpMessage = "Find restart events since this date and time.")] | |
[ValidateNotNullOrEmpty()] |
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
#requires -version 5.1 | |
Function Get-DockerContainer { | |
[cmdletbinding(DefaultParameterSetName = "name")] | |
[alias("gdc")] | |
[OutputType("Get-DockerContainer.myDockerContainer")] | |
Param( | |
[Parameter(Position = 0, HelpMessage = "Enter a docker container name. The default is all running containers.", ParameterSetName = "name")] | |
[ValidateNotNullorEmpty()] |
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
[CmdletBinding(DefaultParameterSetName='Version')] | |
param | |
( | |
[Parameter(ParameterSetName='Latest', Mandatory = $true)] | |
[Parameter(ParameterSetName='Version', Mandatory = $true)] | |
[String] | |
$SaveToPath, | |
[Parameter(ParameterSetName='Version', Mandatory = $true)] | |
[String] |