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
# Parameter Definition | |
Param | |
( | |
[Parameter(mandatory = $true)] [String] $DPMServer, | |
[String] $SendEmailTo, | |
[String] $OutputDirectory, | |
[String] $SMTPServer | |
) | |
# HTML Body Definition Start |
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 Resolve-Host() | |
{ | |
Param( | |
[Parameter(Mandatory=$true,Position=0)] $HostEntry, | |
[Switch] $HostnameToIP, | |
[Switch] $FlushDNS | |
) | |
If($FlushDNS) | |
{ |
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-Distance() | |
{ | |
Param( | |
[Parameter(Mandatory=$true,Position=0)] $Origin, | |
[Parameter(Mandatory=$true,Position=1)] $Destination, | |
[Parameter(Mandatory=$true,Position=2)] [ValidateSet('driving','bicycling','walking')] $Mode, | |
[Switch] $InMiles | |
) | |
$Units='metric' # Default set to Kilometers |
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
Param( | |
[Parameter(Mandatory=$true,Position=0)] $ImportModuleFrom, | |
[Parameter(Position=1)] $LogPath | |
) | |
Function Create-Form | |
{ | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null | |
# Create the Conatainer Form to place the Labels and Textboxes |
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-Direction() | |
{ | |
Param( | |
[Parameter(Mandatory=$true,Position=0)] $Origin, | |
[Parameter(Mandatory=$true,Position=1)] $Destination, | |
[Parameter(Position=2)] [ValidateSet('driving','bicycling','walking')] $Mode ="driving", | |
[Switch] $InMiles | |
) | |
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-Synonym | |
{ | |
Param( | |
[Parameter(Mandatory=$true)] | |
[ValidateScript({ | |
If($_ -match "^[a-zA-Z]+$"){ | |
$True | |
} |
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
#Test-PortConnectivity -Source '127.0.0.1' -RemoteDestination 'dc1' -Port 57766 | |
#Test-PortConnectivity '127.0.0.1' 'dc1' 57766 -Protocol UDP -Iterate | |
#Test-PortConnectivity 'localhost' 'dc2' 51753 -Protocol UDP | |
#Test-PortConnectivity -Source $EUCAS -RemoteDestination $EUMBX -Port 135 -Iterate | |
#Test-PortConnectivity -Source 'localhost' -RemoteDestination '127.0.0.1' -Port 135 -Iterate -protocol TCP | |
Function Test-PortConnectivity() | |
{ | |
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
Function Auto-Complete() | |
{ | |
Return (Invoke-RestMethod -Uri "http://api.bing.com/qsml.aspx?query=$($TextBox1.text)").searchsuggestion.section.item.text | |
} | |
Function Create-WinForm() | |
{ | |
#Calling the Assemblies | |
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") |
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 to fetch the data from Wolfram|Alpha API based on user query | |
Function Invoke-WolframAlphaAPI($Query) | |
{ | |
Return (Invoke-RestMethod -Uri "http://api.wolframalpha.com/v2/query?appid=APIKEY&input=$($Query.Replace(' ','%20'))").queryresult | |
} | |
#Eventhandler and Flow control once the Search button is pressed | |
$EventHandler =[System.EventHandler]{ | |
$Panel2.Visible = $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 Get-Emotion() | |
{ | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory=$true,ValueFromPipeline=$true)] | |
[string] $ImagePath | |
) | |
$Splat = @{ | |
OlderNewer