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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- ******************************************************************* | |
Copyright (c) James O'Neill 2022 - Shared under the MIT License https://mit-license.org/ | |
Allows [consoleColor] to be used like this | |
ps > [ConsoleColor]::Red.Foreground("This is red") | |
ps > [ConsoleColor]::DarkYellow.Background([ConsoleColor]::red.Foreground("This is red on darkyellow")) |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<Configuration> | |
<SelectionSets><SelectionSet> | |
<Name>FileSystemTypes</Name> | |
<Types> | |
<TypeName>System.IO.DirectoryInfo</TypeName> | |
<TypeName>System.IO.FileInfo</TypeName> | |
</Types> | |
</SelectionSet></SelectionSets> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#### | |
#### Proxy function to restore Writing the URI to verbose when calling Invoke-RestMethod | |
#### When calling out of a module -Verbose isn't inherited so the function fiddles verbosepreference as a parameter. | |
Function Invoke-RestMethod { | |
[CmdletBinding(DefaultParameterSetName='StandardMethod', HelpUri='https://go.microsoft.com/fwlink/?LinkID=2096706')] | |
<# | |
.ForwardHelpTargetName Microsoft.PowerShell.Utility\Invoke-RestMethod | |
.ForwardHelpCategory Cmdlet | |
#> | |
param( |
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 | |
Remove Soft-deleted API Management service | |
.description | |
Re-deploying the API management service fails with a message | |
See https://aka.ms/apimsoftdelete | |
That says call the REST API. This does that. | |
#> | |
[cmdletbinding(SupportsShouldProcess=$true,confirmImpact='High' )] | |
param ( |
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
# rev 0.2 added more comments, and made the regax a bit more precise. | |
function SplitEmUp { | |
param ( | |
$paramString | |
) | |
#This regex will isolate quoted blocks e.g. " -example )( $quote " | |
# and will identify matching open and close () {} and [] even if nested. | |
$opensAndCloses = @' | |
(?x) # Allow comments and ignore spaces and line breaks in the layaout. | |
^(?> # Start and make the repeating group ‘atomic’. |
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
#I created this to show how much there is on the MS Graph API. | |
#I pulled down the openapi (nee swagger) files for Users, users.actions, Users,functions and groups | |
#And using my https://github.com/jhoneill/PSGraph - my version of Kevin Marquette's graphViz Module | |
#this litte bit of script produced a graphical version | |
$paths = @() | |
$ParentHash = @{} | |
function hasParent { | |
# .synopsis if the parent isn't in the call recursively with the parent. Add item and its parent to the hash | |
param($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 Show-Help { | |
<# | |
.Synopsis | |
Open help in "Show window" mode | |
#> | |
param ( | |
[parameter(ValueFromPipeline=$true)] | |
[ArgumentCompleter({ | |
param($commandName, $parameterName,$wordToComplete,$commandAst,$fakeBoundParameter) | |
[System.Management.Automation.CompletionCompleters]::CompleteCommand($wordToComplete) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.