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()] | |
param ( | |
$authorisation, | |
$pathFilter, | |
$collectionUri, | |
$project, | |
$buildId | |
) | |
$changesUrl = "$collectionUri/$project/_apis/build/builds/$buildId/changes?api-version=6.0" |
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 7 | |
#You can load this script with $(iwr https://tinyurl.com/TraceAICommand | iex) | |
using namespace Microsoft.ApplicationInsights | |
using namespace Microsoft.ApplicationInsights.Extensibility | |
using namespace Microsoft.ApplicationInsights.DataContracts | |
using namespace System.Management.Automation | |
using namespace System.Collections.Generic | |
using namespace System.Net | |
#Reference: https://docs.microsoft.com/en-us/azure/azure-monitor/app/console |
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 7 -module Microsoft.Graph.Applications | |
using namespace Microsoft.Graph.PowerShell.Models | |
using namespace System.Collections.Generic | |
enum MicrosoftGraphServicePrincipalType { | |
Application | |
Delegated | |
} | |
class MgServicePrincipalPermission { |
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 | |
The synopsis goes here. This can be one line, or many. | |
This version of the template has inbuilt functions to capture credentials and store it securely for reuse | |
Avoids the need to have plaintext passwords in the script | |
.DESCRIPTION | |
The description is usually a longer, more detailed explanation of what the script or function does. | |
Take as many lines as you need. |
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 Out-JSONView { | |
[cmdletbinding()] | |
Param ( | |
[parameter(ValueFromPipeline)] | |
[psobject]$InbutObject, | |
[int]$Depth = 2 |
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-DirectoryContent { | |
<# | |
.SYNOPSIS | |
Function to get directory content | |
.EXAMPLE | |
Get-DirectoryContent -Path "C:\" -HeaderName "poshserver.net" -RequestURL "http://poshserver.net" -SubfolderName "/" | |
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 namespace System.Numerics | |
class Mandelbrot : System.Collections.IEnumerator { | |
# From the constructor? | |
# Sadly, PowerShell doesn't support optional parameters | |
[double]$HorizontalViewOffset = -0.5 | |
[double]$VerticalViewOffset = 0 | |
$Columns = 120 | |
$Rows = 28 | |
$ZoomViewDistance = 6.75 |
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] |
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 HASN'T BEEN ADDED TO THE KBUPDATE REPO YET BUT WILL BE WHEN I GET A MOMENT | |
function Install-KbPatch { | |
<# | |
.SYNOPSIS | |
Installs KBs on local and remote servers on Windows-based systems | |
.DESCRIPTION | |
Installs KBs on local and remote servers on Windows-based systems | |
PowerShell 5.1 must be installed and enabled on the target machine and the target machine must be Windows-based |
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 namespace System.Net.Http | |
#requires -version 7.2 | |
# This is the bootstrap script for Modules | |
[CmdletBinding(PositionalBinding = $false)] | |
param ( | |
#Specify a specific release to use, otherwise 'latest' is used | |
[string]$Release = 'latest', | |
#Specify the user | |
[string]$User = 'JustinGrote', | |
#Specify the repo |
NewerOlder