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 Set-ExecutionStatus | |
{ | |
[CmdletBinding()] | |
[Alias('?$')] | |
Param | |
( | |
[Parameter(ValueFromPipeline = $true)] | |
[Bool]$Boolean | |
) |
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-NetIPMask | |
{ | |
<# | |
.SYNOPSIS | |
Determines the network mask from either its routing prefix or IP address. | |
.DESCRIPTION | |
Determines the network mask from either its routing prefix or IP address. | |
.PARAMETER RoutingPrefix |
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-NChooseK | |
{ | |
<# | |
.SYNOPSIS | |
Returns all the possible combinations by choosing K items at a time from N possible items. | |
.DESCRIPTION | |
Returns all the possible combinations by choosing K items at a time from N possible items. | |
The combinations returned do not consider the order of items as important i.e. 123 is considered to be the same combination as 231, etc. |
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
# Set the location of the root folder | |
$rootFolder = 'C:\PowdrgitExamples' | |
$tempFolder = $Env:TEMP | |
If (!(Test-Path -Path $rootFolder)) | |
{ | |
# Create the root folder if necessary | |
New-Item -Path $rootFolder -ItemType Directory -Force -ErrorAction Stop | Out-Null | |
# Create a non-git folder |