full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/Get-MessageReceiver.ps1 | Get-MessageReceiver.ps1 | function Get-MessageReceiver {
<#
.SYNOPSIS
Get a message receiver instance from the Service Bus Message Factory.
.DESCRIPTION
Get a message receiver instance from the Service Bus Message Factory.
.OUTPUTS
This Cmdlet returns a SbmpMessageReceiver object with references to the MessageFactory of the applicati... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/Import-Module.ps1 | Import-Module.ps1 | # Import-Module.ps1
#
# Place any pre-initialisation script here
# Note:
# * When executed the module is not yet loaded
# * Everything you define here (e.g. a variable) is defined OUTSIDE the module scope.
# If this script is loaded via "ScriptsToProcess" it will incorrectly
# show up as loaded module, see ... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/New-MessageFacility.ps1 | New-MessageFacility.ps1 | function New-MessageFacility {
<#
.SYNOPSIS
Checks if a ServiceBus facility based on a queue, topic or subscription exists (subscription will be created if it does not exists).
.DESCRIPTION
Checks if a ServiceBus facility based on a queue, topic or subscription exists (subscription will be created if it does n... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/New-Message.ps1 | New-Message.ps1 | function New-Message {
<#
.SYNOPSIS
Sends a message to a sender client, which is based on the Service Bus Messaging Factory.
.DESCRIPTION
Sends a message to a sender client, which is based on the Service Bus Messaging Factory.
.OUTPUTS
This Cmdlet returns the MessageId from the Messaging Factory message obje... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/Get-Message.ps1 | Get-Message.ps1 | function Get-Message {
<#
.SYNOPSIS
Receives a message from a receiver client, which is based on the Service Bus Messaging Factory.
.DESCRIPTION
Receives a message from a receiver client, which is based on the Service Bus Messaging Factory.
.OUTPUTS
This Cmdlet returns the Messaging Factory message object. I... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/Get-MessageSender.ps1 | Get-MessageSender.ps1 | function Get-MessageSender {
<#
.SYNOPSIS
Get a message sender instance from the Service Bus Message Factory.
.DESCRIPTION
Get a message sender instance from the Service Bus Message Factory.
.OUTPUTS
This Cmdlet returns a SbmpMessageSender object with references to the MessageFactory of the application. On f... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/Get-MessageBody.ps1 | Get-MessageBody.ps1 | function Get-MessageBody {
<#
.SYNOPSIS
Get the message body from a Service Bus Message.
.DESCRIPTION
Get the message body from a Service Bus Message.
.OUTPUTS
This Cmdlet returns the Body as [String] from the MessageFactory Message object. On failure it returns $null.
.INPUTS
See PARAMETER section for a... |
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Azure.ServiceBus.Client/1.0.2.20160609/Enter-Server.ps1 | Enter-Server.ps1 | function Enter-Server {
<#
.SYNOPSIS
Performs a login to the Service Bus Message Factory.
.DESCRIPTION
Performs a login to the Service Bus Message Factory.
This is the first Cmdlet to be executed and required for all other Cmdlets of this module. It creates service references to the routers of the application... |
PowerShellCorpus/PowerShellGallery/VMware.ImageBuilder/6.5.1.5299608/VMware.ImageBuilder.ps1 | VMware.ImageBuilder.ps1 | [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory]::CoreService.OnImportModule(
"VMware.ImageBuilder",
(Split-Path $script:MyInvocation.MyCommand.Path));
function global:Get-ImageBuilderCommand([string] $Name = "*") {
get-command -module VMware.ImageBuilder -Name $Name
}
# SIG # Begin signatur... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Select-CurrentTextAsVariable.ps1 | Select-CurrentTextAsVariable.ps1 | function Select-CurrentTextAsVariable {
<#
.Synopsis
Attempts to select the current text as a type
.Description
Attempts to select the current text as a type.
Will not display errors for selections that could not be coerced into a
type.
.Example
Selec... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Select-CurrentText.ps1 | Select-CurrentText.ps1 | function Select-CurrentText {
<#
.Synopsis
Returns the currently selected text
.Description
Returns the text that is currently selected from within the editor,
the output, and the command pane
.Example
Select-CurrentText
#>
param(
# If set, ignores... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-EditorCaretPosition.ps1 | Get-EditorCaretPosition.ps1 | function Get-EditorCaretPosition
{
param()
process
{
$document = Get-CurrentDocument -Editor
if ($Host.Name -eq "Windows PowerShell ISE Host") {
New-Object PSObject -Property @{
CaretLine = $document.CaretLine
CaretColumn = $document.CaretColumn
}
} elseif ($Host.Name -e... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Edit-Script.ps1 | Edit-Script.ps1 | function Edit-Script
{
<#
.Synopsis
Edits a script in the current PowerShell Editor
.Description
Opens a script for editing
.Example
Edit-Script .\Edit-Script.ps1
.Example
Get-ChildItem -filter *.ps1 | Edit-Script
#>
param(
# The name of the file that being edited
[... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Colorize.ps1 | Colorize.ps1 | function Copy-Colored
{
<#
.Synopsis
Copies the currently selected text in the current file with colorization
.Description
Copies the currently selected text in the current file with colorization.
This allows for a user to paste colorized scripts into Word or Outlook
.Exa... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-PInvoke.ps1 | Add-PInvoke.ps1 | function Add-PInvoke
{
<#
.Synopsis
Creates C# code to access a C function
.Description
Creates C# code to access a C function
.Example
Add-PInvoke -Library User32.dll -Signature GetSystemMetrics(uint Metric)
.Parameter Library
A C Library containing code to... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/New-ScriptModuleFromCurrentLocation.ps1 | New-ScriptModuleFromCurrentLocation.ps1 | function New-ScriptModuleFromCurrentFile {
<#
.Synopsis
Creates a new basic script module (.PSM1) from location of the current file
.Description
Creates a new basic script module (.PSM1) from location of the current file
All .ps1 files in the same directory as the current file ... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-CurrentDocumentEditor.ps1 | Get-CurrentDocumentEditor.ps1 | function Get-CurrentDocumentEditor
{
param()
process {
Get-CurrentDocument -Editor
}
} |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Move-ToLastGroup.ps1 | Move-ToLastGroup.ps1 |
function Move-ToLastGroup {
<#
.Synopsis
Moves to the next grouping token ({}) in the current script
.Description
Moves to the next grouping token ({}) in the current script
.Example
Move-ToLastGroup
.Link
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-CurrentToken.ps1 | Get-CurrentToken.ps1 | function Get-CurrentToken {
<#
.Synopsis
Gets the current token within a file
.Description
Gets the current token within a file
.Example
Get-CurrentToken
#>
param(
# The tokens for the file
$tokens,
# The line within the file
$line,
#... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Edit-Command.ps1 | Edit-Command.ps1 | None |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Select-CurrentTextAsType.ps1 | Select-CurrentTextAsType.ps1 | function Select-CurrentTextAsType {
<#
.Synopsis
Attempts to select the current text as a type
.Description
Attempts to select the current text as a type.
Will not display errors for selections that could not be coerced into a
type
.Example
Select-Cu... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/IsePackV2.EzFormat.ps1 | IsePackV2.EzFormat.ps1 | $moduleRoot = Get-Module IsePackV2 | Split-Path
$formatting = Write-FormatView -TypeName IcicleInfo -Action {
if ($request -and $response) {
# Web view
"<h3>$($_.Name)</h3>
<hr/>
<blockquote>
$(Write-ScriptHTML -Script $_.Icicle )
</blockquote>
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Show-Icicle.ps1 | Show-Icicle.ps1 | function Show-Icicle
{
<#
.Synopsis
Shows an icicle
.Description
Shows an icicle. Icicles are little apps for the PowerShell ISE.
.Example
Get-Icicle | Shows-Icicle
# Shows all icicles
.Link
Hide-Icicle
.Link
Get-Icicle
.Link
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/ConvertTo-ShortcutKeyTable.ps1 | ConvertTo-ShortcutKeyTable.ps1 | function ConvertTo-ShortcutKeyTable
{
<#
.Synopsis
Converts a hierarchical menu into a table of shortcuts
.Description
Converts a menu specified as a hashtable (for use with Add-IseMenu) to
a flat list of objects
.Example
ConvertTo-ShortcutKeyTable @{
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Start-Demo.ps1 | Start-Demo.ps1 | function Start-Demo
{
param(
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[Alias('Fullname')]
[string]$fileName,
[Switch]$Paused
)
process {
$resolvedFile = $ExecutionContext.SessionState.Path.GetResolvedPSPathFromPSPath($fileName)
if (-no... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/New-Script.ps1 | New-Script.ps1 | None |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Invoke-Line.ps1 | Invoke-Line.ps1 | function Invoke-Line {
<#
.Synopsis
Invokes the current line in the ISE
.Description
Invokes the curreent line in the Windows PowerShell Integrated Scripting Environment
.Example
Invoke-Line
#>
param()
$document = Get-CurrentDocument -Editor
if ($host.Name... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Import-Icicle.ps1 | Import-Icicle.ps1 | function Import-Icicle
{
<#
.Synopsis
Imports Icicles
.Description
Imports Icicles (advanced add ons for the PowerShell Integrated Scripting Environment)
.Example
Import-Icicle Clock
.Link
Add-Icicle
.Link
Remove-Icicle
.Link
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/ConvertTo-ISEAddOn.ps1 | ConvertTo-ISEAddOn.ps1 | function ConvertTo-ISEAddOn
{
<#
.Synopsis
Converts ShowUI to an ISEAddOn
.Description
Compiles an ISE Add-on from a ShowUI Script
.Link
http://show-ui.org/
#>
[CmdletBinding(DefaultParameterSetName="CreateOnly")]
param(
# The display name of the add... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Write-SessionLockdown.ps1 | Write-SessionLockdown.ps1 | function Write-SessionLockdown
{
<#
.Synopsis
Writes a script to lock down a session to a list of required commands
.Description
Writes a script to lock down a session to a list of required commands.
This script can be at the end of a constrained runspace definiton
.... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Show-TypeConstructorForCurrentType.ps1 | Show-TypeConstructorForCurrentType.ps1 | function Show-TypeConstructorForCurrentType {
<#
.Synopsis
Shows type constructors for the currently selected type
.Description
Attempts to convert the selected text to a type and dislay the constructors
.Example
Show-TypeConstructorForCurrentType
#>
param()
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Switch-Icicle.ps1 | Switch-Icicle.ps1 | function Switch-Icicle
{
<#
.Synopsis
Switches the visibility of an icicle
.Description
Shows an icicle that is hidden. Hides an Icicle that is shown. Icicles are little apps for the PowerShell ISE.
.Example
Get-Icicle | Shows-Icicle
# Shows all icicles
.L... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Save-Function.ps1 | Save-Function.ps1 | function Save-Function
{
<#
.Synopsis
Saves one or more functions into automatically named files (i.e. Invoke-MyFunction.ps1)
.Description
Saves functions into automatically named files.
#>
param(
# A script block. When provided an external script,
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-PowerGUIMenu.ps1 | Add-PowerGUIMenu.ps1 | function Add-PowerGUIMenu {
<#
.Synopsis
Helper function to add menus to the PowerGUI Script Editor
.Description
Makes adding menus to the PowerGUI Script Editor
easier. Add-PowerGUIMenu accepts a hashtable of menus.
Each key is the name of the menu.
Ke... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-CurrentDocument.ps1 | Get-CurrentDocument.ps1 | function Get-CurrentDocument
{
[CmdletBinding(DefaultParameterSetName='DocumentObject')]
param(
[Parameter(Mandatory=$true,ParameterSetName='GetEditor')]
[switch]
$Editor,
[Parameter(Mandatory=$true,ParameterSetName='GetText')]
[switch]
$Text,
[Parameter(Mandato... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Remove-Icicle.ps1 | Remove-Icicle.ps1 | function Remove-Icicle
{
<#
.Synopsis
Removes an icicle
.Description
Removes an icicle. Icicles are little apps for the PowerShell ISE.
.Example
Get-Icicle | Remove-Icicle
# Hides all icicles
.Link
Show-Icicle
.Link
Get-Icicle
.L... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-Icicle.ps1 | Add-Icicle.ps1 | function Add-Icicle
{
<#
.Synopsis
Adds an Icicle to the ISE
.Description
Adds an icicle to the ISE. Icicles are mini-apps for the PowerShell ISE.
.Link
Import-Icicle
.Example
Add-Icicle -Horizontal -Name Clock -Screen {
New-Border -Child {
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Hide-Icicle.ps1 | Hide-Icicle.ps1 | function Hide-Icicle
{
<#
.Synopsis
Hides an icicle
.Description
Hides an icicle. Icicles are little apps for the PowerShell ISE.
.Example
Get-Icicle | Hide-Icicle
# Hides all icicles
.Link
Show-Icicle
.Link
Get-Icicle
.Link
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Show-HelpForCurrentSelection.ps1 | Show-HelpForCurrentSelection.ps1 | function Show-HelpForCurrentSelection {
<#
.Synopsis
Shows help for the currently selected text
.Description
Shows helps for the currently selected text
.Example
Show-HelpForCurrentSelection
#>
param()
Select-CurrentText |
ForEach-Object {
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-WalkthruMetaData.ps1 | Get-WalkthruMetaData.ps1 | # Some Demo Text
# Some More Demo Text
#.Audio MyAudioFile
#.Video MyVideoFile
#.Question "What Color is the Sky?"
#.Answer {$input -like "*Blue*" }
#.Hint { "Look Outside", "On a Nice Day", "Are you color blind?" }
function Get-WalkthruMetaData {
<#
.SynsopsiS
Gets information from a ... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Write-RemoteDataCollector.ps1 | Write-RemoteDataCollector.ps1 | function Write-RemoteDataCollector
{
<#
.Synopsis
Writes a function that collects information from several machines using fan-out remoting
.Description
Writes a function that collects information from several machines using fan-out remoting
.Example
Write-RemoteDataCollec... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Start-IsePack.ps1 | Start-IsePack.ps1 | param([Hashtable]$options)
if ($options.ForPublication) {
return
}
if ($options.Clean) {
Remove-Item "$home\Documents\WindowsPowerShell\Modules\EZOut" -Recurse
Remove-Item "$home\Documents\WindowsPowerShell\Modules\Pipeworks" -Recurse
}
$modulePaths = $env:PSModulePath -split ';'
$showUI... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Push-CurrentFileLocation.ps1 | Push-CurrentFileLocation.ps1 | function Push-CurrentFileLocation {
<#
.Synopsis
Runs Push-Location into the location of the current file
.Description
Runs Push-Location into the location of the current file
.Example
Push-CurrentFileLocation
#>
param()
$currentScriptPath = Get-CurrentScriptPa... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Close-AllOpenedFiles.ps1 | Close-AllOpenedFiles.ps1 | function Close-AllOpenedFiles
{
<#
.Synopsis
Automatically closes all saved open files
.Description
Checks each file in the current tab to see if it is saved.
If the file is saved, then the file will be closed.
.Example
Close-AllOpenedFiles
#>
param()
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Update-Icicle.ps1 | Update-Icicle.ps1 | function Update-Icicle
{
<#
.Synopsis
.Description
#>
param(
[Parameter(Mandatory=$true,Position=0,ParameterSetName='UpdateIcicleNow')]
[string]
$Name,
# The script block used to update the icicle
[Parameter(Mandatory=$true,Position=1,ParameterSetName='Up... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-IfStatement.ps1 | Add-IfStatement.ps1 | function Add-IfStatement
{
<#
.Synopsis
Adds an if Statement to the ISE
.Description
Adds an if Statement to the ISE
.Example
Add-IfStatement
#>
param()
process {
Add-TextToCurrentDocument -Text "if ( <# This Happens #>) { <# Then Do This #> }"
}
}
|
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Copy-Clipboard.ps1 | Copy-Clipboard.ps1 | function Copy-Clipboard
{
param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[String]
$Text
)
begin {
$null = [Reflection.Assembly]::Load("PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35")
}
process {
if... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-InlineHelp.ps1 | Add-InlineHelp.ps1 | function Add-InlineHelp {
<#
.Synopsis
Adds a template for inline help into the current file.
.Description
Adds a template for inline help into the current file in
the Integrated Scripting Environment
.Example
Add-InlineHelp
#>
param()
Add-T... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Clear-Icicle.ps1 | Clear-Icicle.ps1 | None |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-CurrentFunction.ps1 | Get-CurrentFunction.ps1 | function Get-FunctionFromText {
<#
.Synopsis
A Quick Description of what the command does
.Description
A Detailed Description of what the command does
.Example
An example of using the command
#>
$allTokens = Get-CurrentOpenedFileToken
$currentTok... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Show-Member.ps1 | Show-Member.ps1 | function Show-Member {
<#
.Synopsis
Displays a searchable gridview contaning the members of an object
.Description
Displays a searchable gridview containing the members of an object.
The object can either a variable, cmdlet, or a type with no
constructors.
.Examp... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-CurrentScriptPath.ps1 | Get-CurrentScriptPath.ps1 | function Get-CurrentScriptPath
{
param()
process {
Get-CurrentDocument -Path
}
} |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Update-ScriptPalette.ps1 | Update-ScriptPalette.ps1 | None |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-Walkthru.ps1 | Get-Walkthru.ps1 | # Some Demo Text
# Some More Demo Text
#.Audio MyAudioFile
#.Video MyVideoFile
#.Question "What Color is the Sky?"
#.Answer {$input -like "*Blue*" }
#.Hint { "Look Outside", "On a Nice Day", "Are you color blind?" }
function Get-Walkthru {
<#
.SynsopsiS
Gets information from a file as a walkth... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-SwitchStatement.ps1 | Add-SwitchStatement.ps1 | function Add-SwitchStatement
{
<#
.Synopsis
Adds a Switch Statement to the current file
.Description
Adds a Switch statement to the current file within the integrated scripting environment
.Example
Add-SwitchStatement
#>
param()
Add-TextToCurrentDocument -... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Out-Default.ps1 | Out-Default.ps1 | function Out-Default {
[CmdletBinding()]
param(
[Parameter(ValueFromPipeline=$true)]
[psobject]
$InputObject
)
begin {
$global:lastOutputCollection = New-Object Collections.ArrayList
try {
$outBuffer = $null
if ($PSBoun... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-ScriptToken.ps1 | Get-ScriptToken.ps1 | function Get-ScriptToken {
<#
.Synopsis
Gets the tokens within a script block of file
.Description
Gets the tokens within a script block of file
.Example
Get-ScriptToken {
function foo() {
"foo"
}
function bar() {
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-IseMenu.ps1 | Add-IseMenu.ps1 | function Add-IseMenu {
<#
.Synopsis
Helper function to add menus to the ISE
.Description
Makes adding menus to the Windows PowerShell Integrated Scripting Environment (ISE)
easier. Add-IseMenu accepts a hashtable of menus.
Each key is the name of the menu.
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/New-ScriptModule.ps1 | New-ScriptModule.ps1 | function New-ScriptModule
{
<#
.Synopsis
Creates a new module and manifest
.Description
Creates a new module and manifest
.Example
New-ScriptModule 'MyModule'
#>
[CmdletBinding(DefaultParameterSetName='NotRequired')]
param(
[Parameter(Mandatory=$... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Select-NextGroup.ps1 | Select-NextGroup.ps1 | function Select-Scope {
<#
.Synopsis
Selects the current scope
.Description
Selects the current scope
.Example
Select-Scope
#>
$allTokens = @(Get-CurrentOpenedFileToken)
$currentToken = Get-CurrentToken
$info = @{}
for ($i... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-ForeachStatement.ps1 | Add-ForeachStatement.ps1 | function Add-ForeachStatement
{
<#
.Synopsis
Adds a Foreach Statement to the current document
.Description
Adds a Foreach Statement to the current document
.Example
Add-ForeachStatement
#>
param()
process {
Add-TextToCurrentDocument -Text "foreach (`... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Select-CurrentTextAsCommand.ps1 | Select-CurrentTextAsCommand.ps1 | function Select-CurrentTextAsCommand {
<#
.Synopsis
Attempts to select the current text as a command
.Description
Attempts to select the current text as a command.
Will not display any errors if the current text could not
be selected as a command
.Example
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Set-EditorCaretPosition.ps1 | Set-EditorCaretPosition.ps1 | function Set-EditorCaretPosition
{
param(
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[ValidateRange(1,1073741824)]
[Alias('StartLine','CaretLine')]
[Int]
$Line,
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[ValidateRange(1,1073741824)]
[Alias('Start... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/ConvertTo-Function.ps1 | ConvertTo-Function.ps1 | function ConvertTo-Function
{
[CmdletBinding(DefaultParameterSetName='Name')]
param(
[Parameter(ParameterSetName='Name',
Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
Position=0)]
[String]
$Name,
[Parameter(ParameterSetName='Name',
ValueFro... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Stop-Demo.ps1 | Stop-Demo.ps1 | function Stop-Demo {
<#
.Synopsis
Stops any running demos
.Description
Stops any demos and closes the demo icicle
.Example
Stop-Demo
#>
param()
Get-Icicle -IcicleName Demo | Remove-Icicle -Confirm:$false
}
|
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Move-ToNextGroup.ps1 | Move-ToNextGroup.ps1 | function Move-ToNextGroup {
<#
.Synopsis
Moves to the next grouping token ({}) in the current script
.Description
Moves to the next grouping token ({}) in the current script
.Example
Move-toNextGroup
#>
$allTokens = Get-Cur... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-Parameter.ps1 | Add-Parameter.ps1 | function Add-Parameter {
<#
.Synopsis
Adds a Parameter attribute to the current file in the ISE
.Description
Adds a Parameter attribute to the current file in the ISE
.Example
Add-Parameter #>
param(
#The name of the parameter
[Parameter(Position=... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Select-TextInEditor.ps1 | Select-TextInEditor.ps1 | function Select-TextInEditor
{
param(
[Parameter(Mandatory=$true,ParameterSetName='Region',ValueFromPipelineByPropertyName=$true)]
[int]$StartLine,
[Parameter(Mandatory=$true,ParameterSetName='Region',ValueFromPipelineByPropertyName=$true)]
[int]$StartColumn,
[Parameter(Mandatory=$true,ParameterSetN... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-SparkPlugScreen.ps1 | Add-SparkPlugScreen.ps1 | function Add-SparkplugScreen
{
param(
[Parameter(Mandatory=$true)]
[string]
$Name,
[Parameter(Mandatory=$true)]
[ScriptBlock]
$Screen,
[ScriptBlock]
$Update,
[Timespan]$UpdateFrequency = "0:0:15"
)
$runningJob = Get-Job -Name Sparkp... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Push-Module.ps1 | Push-Module.ps1 | |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-OpenedFile.ps1 | Get-OpenedFile.ps1 | function Get-OpenedFile
{
param(
)
if ($Host.Name -eq 'PowerGUIScriptEditorHost') {
foreach ($win in $pgse.DocumentWindows) {
New-Object PSObject -Property @{
Tab = ''
Path = Split-Path $_.document.path
File = Split-Path $_.d... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-TextToCurrentDocument.ps1 | Add-TextToCurrentDocument.ps1 | function Add-TextToCurrentDocument
{
param(
[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[AllowEmptyString()] # allow empty string added by bernd_k
[string]
$Text
)
if ($Host.Name -eq 'PowerGUIScriptEditorHost') {
# there mig... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-Icicle.ps1 | Get-Icicle.ps1 | function Get-Icicle
{
<#
.Synopsis
Gets icicles
.Description
.Example
#>
param(
[Parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]
[Alias('Name')]
[string]$IcicleName,
[Switch]$Available
)
process {
if (-no... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Show-TypeConstructor.ps1 | Show-TypeConstructor.ps1 | function Show-TypeConstructor {
<#
.Synopsis
Shows the constructors for a given type
.Description
Calls the toString method on each constructor on a given type,
which gives a (moderately) human readable output of how to create
the type
.Example
[string],... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-CurrentOpenedFileToken.ps1 | Get-CurrentOpenedFileToken.ps1 | function Get-CurrentOpenedFileToken {
<#
.Synopsis
Gets the PowerShell Parser Tokens for the current file
.Description
Converts the current file into a list of powershell tokens
Scripters can use these tokens to figure out exact context within a script
.Example
Ge... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-LastOutput.ps1 | Get-LastOutput.ps1 | function Get-LastOutput
{
param()
$global:Lastoutput
}
|
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Add-CommentHelp.ps1 | Add-CommentHelp.ps1 | function Add-CommentHelp {
<#
.Synopsis
Adds comment help to the ISE
.Description
Adds comment help to a file in the
.Example
Add-CommentHelp "Adds Comment Help to the ISE" "Adds Comment Help to a File in the Windows PowerShell Integrated Scripting Environment (ISE... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Crud.ps1 | Crud.ps1 | function Add-PowerShellIcicle {
<#
.Synopsis
Adds items to IsePack PowerShellIcicle
.Description
Adds PowerShellIcicles
.Example
Add-PowerShellIcicle
.Link
Set-AzureTable
#>
param(
<#
The name of the icicle
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/New-ScriptPalette.ps1 | New-ScriptPalette.ps1 | function New-ScriptPalette
{
param(
$Attribute = "#FFADD8E6",
$Command = "#FF0000FF",
$CommandArgument = "#FF8A2BE2",
$CommandParameter = "#FF000080",
$Comment = "#FF006400",
$GroupEnd = "#FF000000",
$GroupStart = "#FF000000",
$Keyword = "#FF00008B",
$LineContinuati... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Switch-CommentOrText.ps1 | Switch-CommentOrText.ps1 | function Switch-CommentOrText {
<#
.Synopsis
Switches between commented and uncommented text
.Description
Takes a block of text. Uncomments lines that are commented out and
comments lines that are not already commented out.
.Example
Switch-CommentOrText $psise.... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Invoke-Selection.ps1 | Invoke-Selection.ps1 | function Invoke-Selection {
<#
.Synopsis
Invokes the current line in the scripting editor
.Description
Invokes the current line in the scripting editor
.Example
Invoke-Selection
#>
param()
if ($host.Name -eq "Windows PowerShell ISE Host") {
# Um, already ... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Get-CurrentOpenedFileText.ps1 | Get-CurrentOpenedFileText.ps1 | function Get-CurrentOpenedFileText {
<#
.Synopsis
Gets the PowerShell Parser Tokens for the current file
.Description
Converts the current file into a list of powershell tokens
Scripters can use these tokens to figure out exact context within a script
.Example
Get... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Switch-SelectedCommentOrText.ps1 | Switch-SelectedCommentOrText.ps1 | function Switch-SelectedCommentOrText {
<#
.Synopsis
Toggles Comments on the selected text
.Description
Toggles comments on the currently selected text.
Comment lines will be uncommented and uncommented lines will be commented
.Example
Switch-SelectedCommentOrText... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Write-CommandSplatter.ps1 | Write-CommandSplatter.ps1 | None |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/prompt.ps1 | prompt.ps1 | $global:DefaultPromptColor = $Host.UI.RawUI.ForegroundColor
if ($PSVersionTable.PSVersion -ge '3.0') {
$defaultPromptHash = "21Ny9HAq2ZLp8S/qI5RdcQ=="
$global:DefaultPromptStatus = @({
"PS $($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1))"
# .Link
# http://go.microso... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Show-SyntaxForCurrentCommand.ps1 | Show-SyntaxForCurrentCommand.ps1 | function Show-SyntaxForCurrentCommand {
<#
.Synopsis
Shows syntax for the currenly selected function or cmdlet
.Description
Attempts to convert the selected text to a command and displays the
command syntax if the conversion is successful
.Example
Show-SyntaxForC... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Show-LastOutput.ps1 | Show-LastOutput.ps1 | function Show-LastOutput
{
param()
$lo = Get-LastOutput
if (-not $lo) { return }
$controls = New-Object Collections.Arraylist
$objects = New-Object Collections.Arraylist
$brushes= New-Object Collections.Arraylist
foreach ($i in $lo) {
if ($i -is [Windows.UIElement])... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/AddCommentHelp.ps1 | AddCommentHelp.ps1 | @{
Command = (Get-Command Add-Parameter)
ShortcutKey = "Alt + P"
} |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/AddCommentHelp.Icicle.ps1 | AddCommentHelp.Icicle.ps1 | @{
Command = (Get-Command Add-CommentHelp)
ShortcutKey = "CTRL + ALT + H"
} |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/History.icicle.ps1 | History.icicle.ps1 | @{
Name = 'History'
Screen = {
New-Border -ControlName History -BorderBrush Black -CornerRadius 5 -Child {
New-grid -rows 1*, auto -children {
New-ListBox -SelectionMode Multiple -Row 0 -On_PreviewKeyDown {
if ($_.Key -eq 'E... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Iseman.Icicle.ps1 | Iseman.Icicle.ps1 | @{
Name = 'IseMan'
Horizontal = $true
UpdateFrequency = "0:0:30"
UpdateOnAddOnChange = $true
Screen = {
New-Border -ControlName History -BorderBrush Black -CornerRadius 5 -Child {
New-Grid -Rows Auto, 1*, Auto -Columns 1*, Auto -Children {
New-TextBlock -M... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Find.Icicle.ps1 | Find.Icicle.ps1 | @{
Name = 'Find'
Screen = {
New-Border -ControlName FindInFiles -BorderBrush Black -CornerRadius 5 -Child {
New-grid -rows ((@('Auto') * 9) + '1*') -children {
New-TextBlock "Find in Files" -FontSize 19 -FontFamily 'Segoe UI' -Row 0 -Margin 3 -FontWeight DemiBold
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Helper.icicle.ps1 | Helper.icicle.ps1 | @{
Name = 'Helper'
Screen = {
New-Border -ControlName Helper -BorderBrush Black -CornerRadius 5 -Child {
New-Grid -Rows Auto, Auto, 1*, Auto -Children {
New-TextBlock -FontWeight DemiBold -FontSize 22 -Text "Need some Help?"
New-TextBlock -Row 1 -FontSiz... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Randomizer.Icicle.ps1 | Randomizer.Icicle.ps1 | @{
Name = 'Randomizer'
Screen = {
#$today =Get-Date
$today = $null
if ($today.Month -eq 12 -and
($today.Day -gt 17 -and $today.Day -lt 26)) {
# Christmas Lights!
$xmasVideos = 'http://www.youtube.com/watch?v=rmgf6... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Pipeworks.Icicle.ps1 | Pipeworks.Icicle.ps1 | @{
Name = 'PowerShell Pipeworks'
Screen = {
Import-Module IsePackV2 -Global
New-Border -BorderBrush Black -CornerRadius 5 -On_SizeChanged {
if ($loadedModulesList) {
$LoadedModulesList.Height = $_.NewSize.Height * .2
}
if ... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Pasty.Icicle.ps1 | Pasty.Icicle.ps1 | @{
Name = 'Pasty'
Horizontal = $true
Screen = {
New-Border -ControlName Pasty -Padding 10 -CornerRadius 5 -Child {
New-grid -rows auto,1*, auto -Columns 2 -children {
New-TextBlock -Text "Paste early. Refactor often." -FontSize 19 -Margin 9 ... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/ToDo.Icicle.ps1 | ToDo.Icicle.ps1 | # To Do: Test Refresh
@{
Name = 'ToDo'
Screen = {
New-Border -ControlName ToDo -BorderBrush Black -Padding 20 -CornerRadius 5 -Child {
New-Grid -Rows Auto, 1*, Auto -Children {
New-TextBlock -FontWeight DemiBold -FontSize 24 -Text "ToDo"
New-ListBox -On... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Regions.Icicle.ps1 | Regions.Icicle.ps1 | # To Do: Test Refresh
#region The Icicle
@{
Name = 'Regions'
Screen = {
New-Border -ControlName ToDo -BorderBrush Black -Padding 20 -CornerRadius 5 -Child {
New-Grid -Rows Auto, 1*, Auto -Children {
New-TextBlock -FontWeight DemiBold -FontSize 24 -Text "Regions"
... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/Demo.Icicle.ps1 | Demo.Icicle.ps1 | @{
Name = 'Demo'
UpdateFrequency = "0:0:1.01"
UpdateOnAddOnChange = $true
Screen = {
Import-Module IsePackV2 -Global
New-Border -ControlName DemoPlayer -BorderBrush Black -CornerRadius 5 -On_Loaded {
} -Child {
New-Grid -Rows Auto, Auto, ... |
PowerShellCorpus/PowerShellGallery/IsePackV2/1.4.1/Icicles/AddParameter.Icicle.ps1 | AddParameter.Icicle.ps1 | @{
Command = (Get-Command Add-Parameter)
ShortcutKey = "Alt + P"
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.