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 Start-BCBitsDownload ( | |
[parameter(mandatory=$true,Position=0,HelpMessage="enter an Displayname")] | |
[ValidateNotNullOrEmpty()] | |
$Product, | |
[parameter(mandatory=$true,Position=1,HelpMessage="enter Source URL")] | |
[ValidateNotNullOrEmpty()] | |
$Source, | |
[parameter(mandatory=$true,Position=2,HelpMessage="enter Destination 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 Start-psWebRequestServer { | |
[CmdletBinding()] | |
param () | |
begin { | |
# default | |
########### | |
$ServerPort = 5678 | |
$HostNameOrIP = "*" | |
$SingleRequest = $False |
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 Start-psHTTPServer { | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $False, Position = 0, HelpMessage = 'Enter a port for the HTTP Server to listen on. Valid ports are between 1 and 65535. Example: 1234')] | |
[ValidateRange(1, 65535)][int32]$Port = 8081, | |
[Parameter(Mandatory = $False, Position = 1, HelpMessage = 'Enter hostname or ip for listener')] | |
[string]$HostNameOrIP = "*", | |
[Parameter(Mandatory = $False, Position = 2, HelpMessage = 'End listener after single request')] |
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 | |
Start scriptblock in background runspace, which will disposed when finished | |
.DESCRIPTION | |
Start scriptblock in background runspace, which will disposed when finished | |
.PARAMETER SetVariable | |
Variables to be parsed in runspace |
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-FileFromWeb { | |
param ( | |
# Parameter help description | |
[Parameter(Mandatory)] | |
[string]$URL, | |
# Parameter help description | |
[Parameter(Mandatory)] | |
[string]$File | |
) |