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
| # calculate IP address range from CIDR notation and optionally | |
| # provide the full range to iterate over | |
| # https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing | |
| function cidrToIpRange { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory)][string]$cidrNotation, | |
| [switch]$IncludeRange, # add the Range property | |
| [switch]$ExcludeNetworkBroadcast # skip net & broadcast addresses |
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
| #Install WinGet | |
| #Based on this gist: https://gist.github.com/crutkas/6c2096eae387e544bd05cde246f23901 | |
| $hasPackageManager = Get-Command winget -ErrorAction SilentlyContinue | |
| [version]$version = if ($hasPackageManager) { | |
| (winget --version).trim('v') | |
| } | |
| else { | |
| '0.0.0' | |
| } | |
| $releasesUrl = 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.