full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/xXMLConfigFile/2.0.0.0/Examples/AddRemovModifyeSingleAttributeValue/AddRemovModifyeSingleAttributeValue.ps1 | AddRemovModifyeSingleAttributeValue.ps1 | configuration AddRemoveModifySingleAttributeValue
{
param
(
[string[]]$NodeName = 'localhost'
)
Import-DscResource -Module xXMLConfigFile
Node $NodeName
{
#ensure attribute exists and has specified value
XMLConfigFile MaxRetries
{
Confi... |
PowerShellCorpus/PowerShellGallery/xXMLConfigFile/2.0.0.0/Examples/AddRemoveModifyElement/AddRemoveModifyElement.ps1 | AddRemoveModifyElement.ps1 | configuration AddElement
{
param
(
[string[]]$NodeName = 'localhost'
)
Import-DscResource -Name xXMLConfigFile
Node $NodeName
{
XMLConfigFile Element
{
ConfigPath = 'C:\temp\Test.config'
XPath = '/*'
Name = '... |
PowerShellCorpus/PowerShellGallery/PowerPlan/2.0.0.0/Examples/PowerPlan.ps1 | PowerPlan.ps1 | Configuration PowerSettings
{
Import-DscResource -ModuleName PowerPlan
PowerPlan HighPerformance
{
Name = 'High performance'
}
}
PowerSettings -outputpath C:\DSC\PowerPlan |
PowerShellCorpus/PowerShellGallery/PowerPlan/2.0.0.0/Tests/PowerPlan.Tests.ps1 | PowerPlan.Tests.ps1 | #Requires -modules PowerPlan -RunAsAdministrator
Describe 'Discovers and and sets power plan' {
$plans = Get-Powerplan
Context 'List power plans' {
ForEach ($plan in $plans)
{
$plan = $plan.ElementName
It "the returned list includes the $plan plan" ... |
PowerShellCorpus/PowerShellGallery/PowerPlan/2.0.0.0/Tests/Syntax.Tests.ps1 | Syntax.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path | Split-Path -Parent
function Measure-String
{
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline)]
[string[]]$InputObject
,
[string]$SearchString
,
[switch]$SkipComments
)
Begin
{
$count = 0
$inCommentSection... |
PowerShellCorpus/PowerShellGallery/VMware.VimAutomation.Srm/6.5.1.5374694/VMware.VimAutomation.Srm.ps1 | VMware.VimAutomation.Srm.ps1 | [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory]::CoreService.OnImportModule(
"VMware.VimAutomation.Srm.Commands",
(Split-Path $script:MyInvocation.MyCommand.Path));
# SIG # Begin signature block
# MIIdVgYJKoZIhvcNAQcCoIIdRzCCHUMCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4w... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Get-SqlMessage.ps1 | Get-SqlMessage.ps1 | <#
.Synopsis
Returns any available informational messages.
.Description
Get-SqlMessage returns any informational messages generated by
Invoke-SqlScalar, Invoke-SqlQuery, or Invoke-SqlUpdate. Not all providers
support informational messages.
If you use Print or Raiserror without the "NoWa... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Complete-SqlTransaction.ps1 | Complete-SqlTransaction.ps1 | <#
.Synopsis
Complete a sql transaction.
.Description
Complete (COMMIT) a sql transaction.
.Parameter ConnectionName
User defined name for connection.
#>
Function Complete-SqlTransaction {
[cmdletBinding()]
Param([string]$ConnectionName = "default")
If(TestConnectionName -Conn... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Invoke-SqlUpdate.ps1 | Invoke-SqlUpdate.ps1 | <#
.Synopsis
Executes a query and returns number of record affected.
.Description
Executes a query against the targeted connection and returns the the
number of records affected.
.Parameter Query
SQL statement to run.
.Parameter Parameters
Parameters required by the query. Key matches... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Invoke-SqlQuery.ps1 | Invoke-SqlQuery.ps1 | <#
.Synopsis
Executes a query and returns data.
.Description
Executes a query against the targeted connection and returns the data.
This can handle multiple result sets (if underlying provider supports it).
If there are multiple result sets, the output is datatables, otherwise
datarows.
... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Clear-SqlMessage.ps1 | Clear-SqlMessage.ps1 | <#
.Synopsis
Clears all available informational messages.
.Description
Clear-SqlMessage removes all informational messages generated by
Invoke-SqlScalar, Invoke-SqlQuery, or Invoke-SqlUpdate. Not all providers
support informational messages.
.Parameter ConnectionName
User defined name f... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Open-SqlConnection.ps1 | Open-SqlConnection.ps1 |
$val = @'
<#
.Synopsis
Open a connection to a database server.
.Description
Open a connection to a database server.
Supports:
<<<DESCRIPTION>>>
.Parameter ConnectionName
The name to associate with the newly created connection.
This connection will be used with other cmdlets w... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Close-SqlConnection.ps1 | Close-SqlConnection.ps1 | <#
.Synopsis
Closes an existing connection.
.Description
Closes the connection and disposes of the underlying object.
This will also rollback the current transaction if there is one.
.Parameter ConnectionName
User Defined name for the SqlConnection.
#>
Filter Close-SqlConnection {
[C... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Undo-SqlTransaction.ps1 | Undo-SqlTransaction.ps1 | <#
.Synopsis
Undo a sql transaction.
.Description
Undo (ROLLBACK) a sql transaction.
.Parameter ConnectionName
User defined name for connection.
#>
Function Undo-SqlTransaction {
[cmdletBinding()]
Param([string]$ConnectionName = "default")
If(TestConnectionName -ConnectionName... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Get-SqlProviderHelp.ps1 | Get-SqlProviderHelp.ps1 |
$val = @'
<#
.Synopsis
Provides Help for SimplySql providers.
.Description
Provides Help information for the Providers in the SimplySql module.
.Parameter Provider
Specifies which provider to provide help for.
Acceptable provider names are:
<<<LIST>>>
#>
Function Get-SqlProviderHe... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Set-SqlConnection.ps1 | Set-SqlConnection.ps1 | <#
.Synopsis
Set options on the SqlConnection.
.Description
Set Database and/or Command Timeout for the SqlConnection. Changing the
database may not be valid for all providers.
.Parameter ConnectionName
User defined name for connection.
.Parameter Database
Name of the database to con... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Test-SqlConnection.ps1 | Test-SqlConnection.ps1 | <#
.Synopsis
Tests to see if there is a connection.
.Description
Tests to see if there is a connection, use the -All switch to determine
if there are any connections.
.Parameter ConnectionName
User defined name for the connection to test for.
.Parameter All
Returns true if there are a... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Invoke-SqlScalar.ps1 | Invoke-SqlScalar.ps1 | <#
.Synopsis
Executes a Scalar query.
.Description
Executes a Scalar query against the targeted connection.
If the sql statement generates multiple rows and/or columns,
only the first column of the first row is returned.
.Parameter Query
SQL statement to run.
.Parameter Parameters
... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Show-SqlConnection.ps1 | Show-SqlConnection.ps1 | <#
.Synopsis
Lists the current or all SqlConnections.
.Description
Lists the current SqlConnection information or outputs a list of all
SqlConnections currently active.
.Parameter ConnectionName
User Defined name for the SqlConnection.
.Parameter All
Returns a list of names for all ac... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Start-SqlTransaction.ps1 | Start-SqlTransaction.ps1 | <#
.Synopsis
Start a sql transaction.
.Description
Start (BEGIN) a sql transaction.
.Parameter ConnectionName
User defined name for connection.
#>
Function Start-SqlTransaction {
[cmdletBinding()]
Param([string]$ConnectionName = "default")
If(TestConnectionName -ConnectionName... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Cmdlets/Invoke-SqlBulkCopy.ps1 | Invoke-SqlBulkCopy.ps1 | <#
.Synopsis
Executes a bulk copy between two connections.
.Description
Executes a bulk copy operation between two connections. This is highly
optimized if the destination has a managed bulkcopy implemenation, otherwise
it is only generally optimized. For example, SQL Server has a bulk copy
... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Providers/SQLite/init.ps1 | init.ps1 | #Load Up SQLite libraries
Add-Type -Path "$PSScriptRoot\System.Data.SQLite.dll" |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Providers/SQLite/sqlite.ps1 | sqlite.ps1 | Write-Output ([ProviderConfig]::new(
"SQLite (System.Data.SQLite)",
@"
SQLite (System.Data.SQLite)
SQLite Development Team @ https://sqlite.org/
.NET Provider @ http://system.data.sqlite.org/
"@,
@(
@{Name = "DataSource"
Type = [string]
Paramet... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Providers/SQLite/SQLiteProvider.ps1 | SQLiteProvider.ps1 | Class SQLiteProvider : ProviderBase {
SQLiteProvider([string]$ConnectionName
, [int]$CommandTimeout
, [System.Data.SQLite.SQLiteConnection]$Connection) {
$this.ConnectionName = $ConnectionName
$this.CommandTimeout = $CommandTimeout
$this.Connecti... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Providers/SQL/sql.ps1 | sql.ps1 | Write-Output ([ProviderConfig]::new(
"Microsoft SQL Server (System.Data.SqlClient)",
@"
Microsoft SQL Server (System.Data.SqlClient)
MSDN Library @ https://msdn.microsoft.com/en-us/library/system.data.sqlclient.aspx
"@,
@(
@{Name = "DataSource"
Type = [string]
... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Providers/SQL/SqlProvider.ps1 | SqlProvider.ps1 | Class SQLProvider : ProviderBase {
SQLProvider([string]$ConnectionName
, [int]$CommandTimeout
, [System.Data.SqlClient.SqlConnection]$Connection) {
$this.ConnectionName = $ConnectionName
$this.CommandTimeout = $CommandTimeout
$this.Connection = $... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Classes/SqlMessage.ps1 | SqlMessage.ps1 | Class SqlMessage { [datetime]$Received; [string]$Message } |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Classes/ProviderConfig.ps1 | ProviderConfig.ps1 | Class ProviderConfig {
[string]$ShortDescription
[string]$HelpText
[scriptblock]$CreateProvider
[hashtable[]]$ParameterHash
[System.Management.Automation.RuntimeDefinedParameterDictionary]$Parameters = (New-Object System.Management.Automation.RuntimeDefinedParameterDictionary)
ProviderCo... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Classes/ProviderBase.ps1 | ProviderBase.ps1 | Class ProviderBase {
[string]$ConnectionName
[int]$CommandTimeout = 30
[System.Data.IDbConnection]$Connection
[System.Data.IDbTransaction]$Transaction
[System.Collections.Generic.Queue[SqlMessage]]$Messages = (New-Object 'System.Collections.Generic.Queue[SqlMessage]')
ProviderBase() { If... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Functions/CreateMapFunction.ps1 | CreateMapFunction.ps1 | Function CreateMapFunction {
Param([Parameter(Mandatory)][System.Data.DataTable]$SchemaTable)
$sb = [System.Text.StringBuilder]::new()
$sb.AppendLine('Param([parameter(Mandatory)][System.Data.IDataRecord]$dr)') | Out-Null
$sb.AppendLine('Return ([PSCustomObject]@{') | Out-Null
ForEach... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Functions/CreateParameter.ps1 | CreateParameter.ps1 | Function CreateParameter {
Param([string]$Name
, [type]$Type
, [System.Management.Automation.ParameterAttribute[]]$Parameters = @()
, [hashtable[]]$ParameterHashes = @()
, [string[]]$ValidateSet = @()
, [string[]]$Alias = @()
, [object]$DefaultValue)
$At... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Functions/ProcessHashTable.ps1 | ProcessHashTable.ps1 | #dont' think this is needed anymore in PowerShell V3+
Function ProcessHashTable([parameter(Mandatory)][hashtable]$ht) {
If($ht) {
ForEach($key in $ht.keys){
If($ht.$key.GetType() -is [PSObject]) {
$ht.$key = ([PSObject]($ht.$key)).BaseObject
}
}
}
... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Functions/TestConnectionName.ps1 | TestConnectionName.ps1 | Filter TestConnectionName {
Param([parameter(Mandatory, ValueFromPipeline)][string]$ConnectionName
, [switch]$Quiet)
If(-not $Script:Connections.ContainsKey($ConnectionName)) {
If(-not $Quiet.IsPresent) {
If($ConnectionName -eq "Default") { Write-Warning "There is no activ... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Functions/CreateParameterAttribute.ps1 | CreateParameterAttribute.ps1 | Function CreateParameterAttribute {
Param([string]$ParameterSetName = "default"
, [switch]$Mandatory
, [int]$Position = 0
, [switch]$ValueFromPipeline
, [switch]$ValueFromPipelineByPropertyName
, [switch]$ValueFromRemainingArguments
, [string]$HelpMessage)
... |
PowerShellCorpus/PowerShellGallery/SimplySql/0.2.1/Functions/AddDynamicParameterDefaults.ps1 | AddDynamicParameterDefaults.ps1 | Function AddDynamicParameterDefaults {
Param([Parameter(ValueFromPipeline)][System.Collections.Generic.Dictionary[string,object]]$Params)
$Provider, $ParameterSetName = $Params.Provider, $Params.ParameterSetName
ForEach($kvp in $Script:Providers.$Provider.GenerateParameters().GetEnumerator()) {
... |
PowerShellCorpus/PowerShellGallery/BaselineManagement/2.3.0/Tests/HelperFunctions.tests.ps1 | HelperFunctions.tests.ps1 | <############################################################################################
# File: BaselineManagement\HelperFunctions.psm1
# This suite contains Tests that are
# used for validating the BaselineManagement Module.
###############################################################################... |
PowerShellCorpus/PowerShellGallery/xMPC/1.0.2/Example/Sample_xMPC.ps1 | Sample_xMPC.ps1 | # Configuration sample for xMPC.
# Vasken Houdoverdov
#
# Each of the calls to Sample_InstallxMPC below will generate a MOF file which can then be fed into Start-DscConfiguration
#
# Sample_InstallxMPC -VersionNumber "1.7.9" -Architecture "x64" -LocalPath "C:\Windows\DtlDownloads\MPC-HC.1.7.9.x64.exe"
# Sample_In... |
PowerShellCorpus/PowerShellGallery/PSWebAccessAuthorization/0.5.0.0/Tests/PSWebAccessAuthorization.tests.ps1 | PSWebAccessAuthorization.tests.ps1 |
Return "No Pester tests have been defined"
$here = Split-Path -Path $MyInvocation.MyCommand.Path
$parent = Split-Path -Path $here
$module = Split-Path -Path $parent -Leaf
Write-Host "Importing module $module from $parent" -ForegroundColor Cyan
Import-Module $parent -force
InModuleScope $Module {
Descri... |
PowerShellCorpus/PowerShellGallery/AzurePublicIPAddresses/0.8.3/AzurePublicIPAddresses.Tests.ps1 | AzurePublicIPAddresses.Tests.ps1 | Import-Module $PSScriptRoot\AzurePublicIPAddresses.psm1 -Force
Describe 'AzurePublicIPAddresses' {
Context 'Script Analyzer' {
It 'Does not have any issues with the Script Analyser - Get-MicrosoftAzureDatacenterIPRange' {
Invoke-ScriptAnalyzer $PSScriptRoot\Functions\Get-MicrosoftAzureDatacent... |
PowerShellCorpus/PowerShellGallery/AzurePublicIPAddresses/0.8.3/functions/Get-MicrosoftAzureDatacenterIPRangeFile.ps1 | Get-MicrosoftAzureDatacenterIPRangeFile.ps1 | #requires -Version 3.0
function Get-MicrosoftAzureDatacenterIPRangeFile
{
<#
.SYNOPSIS
Downloads either the Microsoft Azure Datacenter IP Ranges file, or the Windows Azure Datacenter IP Ranges in China file. The file can be stored in memory or to the file system.
.... |
PowerShellCorpus/PowerShellGallery/AzurePublicIPAddresses/0.8.3/functions/Get-MicrosoftAzureDatacenterIPRange.ps1 | Get-MicrosoftAzureDatacenterIPRange.ps1 | #requires -Version 4.0
function Get-MicrosoftAzureDatacenterIPRange
{
<#
.SYNOPSIS
Gets the IP ranges associated with Azure regions in CIDR format.
.DESCRIPTION
The Get-MicrosoftAzureDatacenterIPRange cmdlet gets a list of subnets in CIDR format (eg 192.168.1.0/24)... |
PowerShellCorpus/PowerShellGallery/Error/1.4.0.3/Resolve-Error.ps1 | Resolve-Error.ps1 | <#
.SYNOPSIS
Recurses an error record or exception object to flatten nested objects.
.DESCRIPTION
Loops through information caught in catch blocks; from an ErrorRecord (and its InvocationInfo), to Exception, and InnerException.
.PARAMETER ErrorRecord
An error record or exception. By default the last error i... |
PowerShellCorpus/PowerShellGallery/Error/1.4.0.3/Test-Error.ps1 | Test-Error.ps1 | <#
.SYNOPSIS
Recurses an error record or exception object and returns true/false if a match is found.
.DESCRIPTION
Loops through information caught in catch blocks; from an ErrorRecord (and its InvocationInfo), to Exception, and InnerException.
These are then compared to a specific type, or, a hash table wit... |
PowerShellCorpus/PowerShellGallery/Poshjure/1.0/Poshjure.tests.ps1 | Poshjure.tests.ps1 | #
# This is a PowerShell Unit Test file.
# You need a unit test framework such as Pester to run PowerShell Unit tests.
# You can download Pester from http://go.microsoft.com/fwlink/?LinkID=534084
#
Describe "Get-Function" {
Context "Function Exists" {
It "Should Return" {
}
}
} |
PowerShellCorpus/PowerShellGallery/SonicWallVPN/1.1.1/SonicWallVpn.ps1 | SonicWallVpn.ps1 | $userFileName = "vpn.usr"
$pwdFileName = "vpn.pwd"
$nameFileName = "vpn.nme"
function Enable-SonicVpn
{
[CmdletBinding()]
Param
(
)
Write-Verbose -Message "Connecting to VPN..."
$name = Get-VpnName
$user = Get-User
$pwd = Get-Password
& "C:\Program Files\Dell SonicWA... |
PowerShellCorpus/PowerShellGallery/PolicyFileEditor/2.0.2/Common.ps1 | Common.ps1 | #requires -Version 2.0
$script:MachineExtensionGuids = '[{35378EAC-683F-11D2-A89A-00C04FBBCFA2}{D02B1F72-3407-48AE-BA88-E8213C6761F1}]'
$script:UserExtensionGuids = '[{35378EAC-683F-11D2-A89A-00C04FBBCFA2}{D02B1F73-3407-48AE-BA88-E8213C6761F1}]'
function OpenPolicyFile
{
[CmdletBinding()]
param (
... |
PowerShellCorpus/PowerShellGallery/PolicyFileEditor/2.0.2/Commands.ps1 | Commands.ps1 | #requires -Version 2.0
$scriptRoot = Split-Path $MyInvocation.MyCommand.Path
. "$scriptRoot\Common.ps1"
<#
.SYNOPSIS
Creates or modifies a value in a .pol file.
.DESCRIPTION
Creates or modifies a value in a .pol file. By default, also updates the version number in the policy's gpt.ini file.
.PARAMETE... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/tests/PSPuTTY.tests.ps1 | PSPuTTY.tests.ps1 | <#
Assuming that this module is in your $env:PSModulePath, you can invoke this Pester test script:
Set-Location -Path ('{0}\Tests' -f (Get-Module -Name PSPuTTY -ListAvailable).ModuleBase);
./PSPuTTY.tests.ps1
#>
$VerbosePreference = 'continue'
$ErrorActionPreference = 'stop'
describe -Name 'PSPuTTY PowerShell mo... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/models/PSPuTTYTheme.ps1 | PSPuTTYTheme.ps1 | class PSPuTTYTheme {
[string] $Name
[string] $Url
[string] $Colour0
[string] $Colour1
[string] $Colour2
[string] $Colour3
[string] $Colour4
[string] $Colour5
[string] $Colour6
[string] $Colour7
[string] $Colour8
[string] $Colour9
[string] $Colour10
[string] $Col... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/models/PSPuTTYSession.ps1 | PSPuTTYSession.ps1 | class PSPuTTYSession {
[string] $Name ### The name of the PuTTY saved session (URL-encoded).
[string] $Hostname ### The hostname or IP address of the host that the PuTTY saved session will connect to.
[int] $Port ### The TCP port that the PuTTY session will connect to
[string] $ThemeNa... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Functions/Private/Get-PSPuTTYRegistrySessions.ps1 | Get-PSPuTTYRegistrySessions.ps1 | using namespace Microsoft.Win32
function Get-PSPuTTYRegistrySessions {
<#
.Synopsis
Obtains a connection to the PuTTY registry key for the current user's hive.
#>
[CmdletBinding()]
param (
)
$Command = $PSCmdlet.MyInvocation.MyCommand.Name
$Module = $PSCmdlet.MyInvocation.MyCommand.Modul... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Functions/Public/Remove-PSPuTTYSession.ps1 | Remove-PSPuTTYSession.ps1 | function Remove-PSPuTTYSession {
<#
.Synopsis
Removes a PuTTY saved session from the user's profile.
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] $Name
)
### TODO: Implement this function
} |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Functions/Public/Merge-PSPuTTYTheme.ps1 | Merge-PSPuTTYTheme.ps1 | using namespace System.Web
function Merge-PSPuTTYTheme {
<#
.Synopsis
Configures a PuTTY saved session with the specified theme.
.Parameter SessionName
The name of the PuTTY saved session that will have its theme updated.
NOTE: The session name will be URL-encoded, to conform to the store... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Functions/Public/Invoke-PSPuTTYSession.ps1 | Invoke-PSPuTTYSession.ps1 | function Invoke-PSPuTTYSession {
<#
.Synopsis
Invokes a new PuTTY session, with the specified saved session name.
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] $Name
)
Write-Verbose -Message ('Launching new PuTTY session named {0}' -f $Name)
Start-Process -FilePath putt... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Functions/Public/Get-PSPuTTYTheme.ps1 | Get-PSPuTTYTheme.ps1 | function Get-PSPuTTYTheme {
<#
.Synopsis
Returns a list of supported PuTTY themes that are distributed with this PowerShell module.
.Outputs
[PSPuTTYTheme]
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $false)]
[string] $Name
)
$Command = $PSCmdlet.MyInvocation.MyCommand.Name
$Modu... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Functions/Public/Get-PSPuTTYSession.ps1 | Get-PSPuTTYSession.ps1 | using namespace Microsoft.Win32
using namespace System.Web
function Get-PSPuTTYSession {
<#
.Synopsis
Returns a list of configured PuTTY sessions.
.Outputs
[PSPuTTYSession]
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $false)]
[string] $Name
)
$Command = $PSCmdlet.MyInvocation.My... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Functions/Public/New-PSPuTTYSession.ps1 | New-PSPuTTYSession.ps1 | function New-PSPuTTYSession {
<#
.Synopsis
Creates a new PuTTY saved session.
#>
[CmdletBinding()]
param (
[Parameter(Mandatory = $true)]
[string] $Name
, [Parameter(Mandatory = $true)]
[string] $Hostname
, [Parameter(Mandatory = $true)]
[int... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Completers/PSPuTTYSession.Name.ArgumentCompletes.ps1 | PSPuTTYSession.Name.ArgumentCompletes.ps1 | $ScriptBlock = {
<#
.SYNOPSIS
Auto-complete the -Name parameter value for PSPuTTY sessions.
.NOTES
Created by Trevor Sullivan, Founder of Art of Shell <trevor@artofshell.com>
https://trevorsullivan.net https://artofshell.com
#>
param($commandName, $parameterName, $wordToComplete, $comma... |
PowerShellCorpus/PowerShellGallery/PSPuTTY/0.1.1/Completers/PSPuTTYTheme.Name.ArgumentCompletes.1.ps1 | PSPuTTYTheme.Name.ArgumentCompletes.1.ps1 | $ScriptBlock = {
<#
.SYNOPSIS
Auto-complete the -Name parameter value for PSPuTTY sessions.
.NOTES
Created by Trevor Sullivan, Founder of Art of Shell <trevor@artofshell.com>
https://trevorsullivan.net https://artofshell.com
#>
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoun... |
PowerShellCorpus/PowerShellGallery/Pscx/3.2.2/Pscx.UserPreferences.ps1 | Pscx.UserPreferences.ps1 | # ---------------------------------------------------------------------------
# You can override individual preferences by passing a hashtable with just those
# preference defined as shown below:
#
# Import-Module Pscx -arg @{ModulesToImport = @{Prompt = $true}}
#
# Any value not specified will be retrieved f... |
PowerShellCorpus/PowerShellGallery/Pscx/3.2.2/Modules/Prompt/Themes/Modern.ps1 | Modern.ps1 | # ---------------------------------------------------------------------------
# Author: Keith Hill
# Desc: Prompt, colors and host window title updates suited to UAC enabled
# Windows Vista and Windows 7. Elevated (admin) prompts are easy
# distinguish from non-elevated prompts.
# Date: Nov 07... |
PowerShellCorpus/PowerShellGallery/Pscx/3.2.2/Modules/Prompt/Themes/WinXP.ps1 | WinXP.ps1 | # ---------------------------------------------------------------------------
# Author: Keith Hill
# Desc: Prompt, colors and host window title updates suited to Windows XP
# where folks tend to run with adminstrator privileges all the time.
# Date: Nov 07, 2009
# Site: http://pscx.codeplex.com
# Us... |
PowerShellCorpus/PowerShellGallery/Pscx/3.2.2/Modules/Prompt/Themes/Jachym.ps1 | Jachym.ps1 | # ---------------------------------------------------------------------------
# Author: Jachymko
# Desc: Jachym's prompt, colors and host window title updates.
# Date: Nov 07, 2009
# Site: http://pscx.codeplex.com
# Usage: In your options hashtable place the following setting:
#
# PromptTheme = 'J... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Open-ROSSDatabaseConnection.ps1 | Open-ROSSDatabaseConnection.ps1 | function Open-ROSSDatabaseConnection {
<#
.SYNOPSIS
Opens a RES ONE Service Store database connection.
.NOTES
Adapted from the VirtualEngine.Database module.
#>
[CmdletBinding()]
param (
# Microsoft SQL server connection
[Parameter(Mandatory, ValueFromPipeline, ... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Disable-ROSSPerson.ps1 | Disable-ROSSPerson.ps1 | function Disable-ROSSPerson {
<#
.SYNOPSIS
Sets a RES ONE Service person to inactive.
.EXAMPLE
Disable-ROSSPerson -PersonName 'Sales'
Disables all people with a name matching 'Sales'.
.EXAMPLE
Get-ROSSOrganization -Path 'Departments\Sales' | Disable-ROSSPerson
... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Invoke-ROSSRestMethod.ps1 | Invoke-ROSSRestMethod.ps1 | function Invoke-ROSSRestMethod {
<#
.SYNOPSIS
Calls a RES ONE Service Store API method.
.NOTES
This is an internal method and should not be called directly.
#>
[CmdletBinding(DefaultParameterSetName = 'DefaultHashtable')]
param (
# Specifies the RES ONE Service Store API... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Remove-ROSSOrganization.ps1 | Remove-ROSSOrganization.ps1 | function Remove-ROSSOrganization {
<#
.SYNOPSIS
Deletes a RES ONE Service Store Organizational Context.
.NOTES
THIS IS AN UNSUPPORTED DATABASE OPERATION AND THIS METHOD SHOULD NOT BE CALLED DIRECTLY.
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High', DefaultParameterSetN... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Disconnect-ROSSSession.ps1 | Disconnect-ROSSSession.ps1 | function Disconnect-ROSSSession {
<#
.SYNOPSIS
Disconnects connections to the RES ONE Service Store API and/or database..
#>
[CmdletBinding()]
param (
# RES ONE Service Store session connection.
[Parameter()]
[System.Collections.Hashtable] $Session = $script:_RESONES... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Enable-ROSSServiceWorkflowAction.ps1 | Enable-ROSSServiceWorkflowAction.ps1 | function Enable-ROSSServiceWorkflowAction {
<#
.SYNOPSIS
Enables RES ONE Service Store service workflow actions.
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High', DefaultParameterSetName = 'DeliveryName')]
param (
# RES ONE Service Store session connection.
[Pa... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSDataSource.ps1 | Get-ROSSDataSource.ps1 | function Get-ROSSDataSource {
<#
.SYNOPSIS
Queries the RES ONE Service Store database for Data Sources.
#>
[CmdletBinding()]
[OutputType('VirtualEngine.ROSS.DataSource')]
param (
# RES ONE Service Store session connection.
[Parameter()]
[System.Collections.Hasht... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSResourceUri.ps1 | Get-ROSSResourceUri.ps1 | function Get-ROSSResourceUri {
<#
.SYNOPSIS
Returns RES ONE Service Store API endpoint URI.
.NOTES
This is an internal method and should not be called directly.
#>
[CmdletBinding()]
[OutputType([System.String])]
param (
# RES ONE Service Store session connection
... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Disable-ROSSService.ps1 | Disable-ROSSService.ps1 | function Disable-ROSSService {
<#
.SYNOPSIS
Disables RES ONE Service Store service transactions.
.EXAMPLE
Disable-ROSSService -ServiceName 'Sales'
Disables all services with a name matching 'Sales'.
.EXAMPLE
Disable-ROSSService -ServiceId 'a13003e7-3c51-4c22-9c9e-0a... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Disable-ROSSServiceWorkflowAction.ps1 | Disable-ROSSServiceWorkflowAction.ps1 | function Disable-ROSSServiceWorkflowAction {
<#
.SYNOPSIS
Disables RES ONE Service Store service workflow actions.
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High', DefaultParameterSetName = 'DeliveryName')]
param (
# RES ONE Service Store session connection.
[... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Enable-ROSSPerson.ps1 | Enable-ROSSPerson.ps1 | function Enable-ROSSPerson {
<#
.SYNOPSIS
Sets a RES ONE Service person to active.
.EXAMPLE
Enable-ROSSPerson -PersonName 'Sales'
Enables all people with a name matching 'Sales'.
.EXAMPLE
Get-ROSSOrganization -Path 'Departments\Sales' | Enable-ROSSPerson
... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Set-ROSSPerson.ps1 | Set-ROSSPerson.ps1 | function Set-ROSSPerson {
<#
.SYNOPSIS
Updates a RES ONE Service Store person by reference.
.EXAMPLE
$person = Get-ROSSPerson -PersonName 'HJohn Smith'
$person.Name = 'Joe Bloggs'
$person | Set-ROSSPerson
Renames an existing RES ONE Service Store person from 'Jo... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Close-ROSSDatabaseConnection.ps1 | Close-ROSSDatabaseConnection.ps1 | function Close-ROSSDatabaseConnection {
<#
.SYNOPSIS
Closes a RES ONE Service Store database connection.
.NOTES
Adapted from the VirtualEngine.Database module.
#>
[CmdletBinding()]
param (
# RES ONE Service Store session connection.
[Parameter()]
[Syste... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Remove-ROSSDataConnection.ps1 | Remove-ROSSDataConnection.ps1 | function Remove-ROSSDataConnection {
<#
.SYNOPSIS
Deletes a RES ONE Service Store Data Connection.
.NOTES
THIS IS AN UNSUPPORTED DATABASE OPERATION AND THIS METHOD SHOULD NOT BE CALLED DIRECTLY.
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High', DefaultParameterSetName =... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Export-ROSSBuildingBlock.ps1 | Export-ROSSBuildingBlock.ps1 | function Export-ROSSBuildingBlock {
<#
.SYNOPSIS
Imports a RES ONE Service Store building block.
#>
[CmdletBinding()]
param (
# RES ONE Service Store session connection
[Parameter(ValueFromPipelineByPropertyName)]
[System.Collections.Hashtable] $Session = $script:_RE... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Connect-ROSSMSSQLDatabase.ps1 | Connect-ROSSMSSQLDatabase.ps1 | function Connect-ROSSMSSQLDatabase {
<#
.SYNOPSIS
Creates a new RES ONE Service Store Microsoft SQL Server connection using either Windows or SQL authentication.
.NOTES
Adapted from the VirtualEngine.Database module.
#>
[CmdletBinding(DefaultParameterSetName = 'WindowsAuthentication')... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Remove-ROSSDataSource.ps1 | Remove-ROSSDataSource.ps1 | function Remove-ROSSDataSource {
<#
.SYNOPSIS
Deletes a RES ONE Service Store Data Source.
.NOTES
THIS IS AN UNSUPPORTED DATABASE OPERATION AND THIS METHOD SHOULD NOT BE CALLED DIRECTLY.
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High', DefaultParameterSetName = 'InputO... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Connect-ROSSSession.ps1 | Connect-ROSSSession.ps1 | function Connect-ROSSSession {
<#
.SYNOPSIS
Authenticate and creates a connection to the RES ONE Service Store API or database.
.EXAMPLE
Connect-ROSSSession -Server 'servicestore.lab.local' -Credential 'LAB\Administrator'
Create a RES ONE Service Store API session to server 'se... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Import-ROSSBuildingBlock.ps1 | Import-ROSSBuildingBlock.ps1 | function Import-ROSSBuildingBlock {
<#
.SYNOPSIS
Imports a RES ONE Service Store building block.
#>
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'High', DefaultParameterSetName = 'Path')]
param (
# RES ONE Service Store session connection
[Parameter(ValueFromPipeline... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Invoke-ROSSDatabaseQuery.ps1 | Invoke-ROSSDatabaseQuery.ps1 | function Invoke-ROSSDatabaseQuery {
<#
.SYNOPSIS
Executes a SQL server query against a RES ONE Service Store database.
.NOTES
Adapted from the VirtualEngine.Database module.
#>
[CmdletBinding()]
[OutputType([System.Data.DataRow[]])]
param (
# Database connection obj... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Enable-ROSSService.ps1 | Enable-ROSSService.ps1 | function Enable-ROSSService {
<#
.SYNOPSIS
Enables RES ONE Service Store service transactions.
.EXAMPLE
Enable-ROSSService -ServiceName 'Sales'
Enables all services with a name matching 'Sales'.
.EXAMPLE
Enable-ROSSService -ServiceId 'a13003e7-3c51-4c22-9c9e-0a82108... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSOrganizationDb.ps1 | Get-ROSSOrganizationDb.ps1 | function Get-ROSSOrganizationDb {
<#
.SYNOPSIS
Queries the RES ONE Service Store database for Organizational Contexts.
#>
[CmdletBinding()]
[OutputType('VirtualEngine.ROSS.Organization')]
param (
# RES ONE Service Store session connection.
[Parameter()]
[System.... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/New-ROSSPerson.ps1 | New-ROSSPerson.ps1 | function New-ROSSPerson {
<#
.SYNOPSIS
Creates a new RES ONE Service Store person.
.EXAMPLE
$person = New-ROSSPerson -PersonName 'Joe Bloggs'
Creates a new RES ONE Service Store person called 'Joe Bloggs'
.EXAMPLE
$person = New-ROSSPerson -PersonName 'Joe Bloggs'
... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Set-ROSSService.ps1 | Set-ROSSService.ps1 | function Set-ROSSService {
<#
.SYNOPSIS
Updates a RES ONE Service Store service by reference.
.EXAMPLE
$service = Get-ROSSService -ServiceName 'My Hidden Service'
$service.ShowInStore = $false
$service | Set-ROSSService
Hides a service named 'My Hidden Service' ... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSPerson.ps1 | Get-ROSSPerson.ps1 | function Get-ROSSPerson {
<#
.SYNOPSIS
Returns a RES ONE Service person reference.
.EXAMPLE
Get-ROSSPerson -PersonName 'Sales'
Returns all people with a name matching 'Sales'. The RES ONE Service Store API performs a pattern match.
.EXAMPLE
Get-ROSSOrganization -Pat... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSService.ps1 | Get-ROSSService.ps1 | function Get-ROSSService {
<#
.SYNOPSIS
Returns a RES ONE Service Service reference.
.EXAMPLE
Get-ROSSService -All
Returns the first 50 RES ONE Service Store services.
.EXAMPLE
Get-ROSSService -All -PageSize 100
Returns the first 100 RES ONE Service Store... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSTransaction.ps1 | Get-ROSSTransaction.ps1 | function Get-ROSSTransaction {
<#
.SYNOPSIS
Returns a RES ONE Service transaction reference.
.EXAMPLE
Get-ROSSTransaction
Returns the first 50 transactions.
.EXAMPLE
Get-ROSSTransaction -ServiceId 'a13003e7-3c51-4c22-9c9e-0a8210813ed1'
Returns the first 5... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSOrganization.ps1 | Get-ROSSOrganization.ps1 | function Get-ROSSOrganization {
<#
.SYNOPSIS
Returns a RES ONE Service organizational context reference.
#>
[CmdletBinding(DefaultParameterSetName = 'OrganizationName')]
[Alias('Get-ROSSOrganisation')]
[OutputType('VirtualEngine.ROSS.Organization')]
param (
# RES ONE Service... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Assert-ROSSSession.ps1 | Assert-ROSSSession.ps1 | function Assert-ROSSSession {
<#
.SYNOPSIS
Ensures there is an authenticated RES ONE Service Store session established.
#>
[CmdletBinding()]
param (
# RES ONE Service Store session connection.
[Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)]
[System.Co... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Src/Get-ROSSDataConnection.ps1 | Get-ROSSDataConnection.ps1 | function Get-ROSSDataConnection {
<#
.SYNOPSIS
Queries the RES ONE Service Store database for Data Connections.
#>
[CmdletBinding()]
[OutputType('VirtualEngine.ROSS.DataConnection')]
param (
# RES ONE Service Store session connection.
[Parameter()]
[System.Colle... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/DSCResources/ROSSCommon/Src/Get-WindowsInstallerPackageProperty.ps1 | Get-WindowsInstallerPackageProperty.ps1 | function Get-WindowsInstallerPackageProperty {
<#
.SYNOPSIS
This cmdlet retrieves product name from a Windows Installer MSI database.
.DESCRIPTION
This function uses the WindowInstaller COM object to pull all values from the Property table from a MSI package.
.NOTES
Adapted fr... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/DSCResources/ROSSCommon/Src/Resolve-ROSSPackagePath.ps1 | Resolve-ROSSPackagePath.ps1 | function Resolve-ROSSPackagePath {
<#
.SYNOPSIS
Resolves the latest RES ONE Service Store/IT Store installation package.
#>
[CmdletBinding()]
param (
## The literal file path or root search path
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[System.Strin... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/DSCResources/ROSSCommon/Src/Start-WaitProcess.ps1 | Start-WaitProcess.ps1 | function Start-WaitProcess {
<#
.SYNOPSIS
Starts and waits for a process to exit.
.NOTES
This is an internal function and shouldn't be called from outside.
#>
[CmdletBinding(SupportsShouldProcess)]
[OutputType([System.Int32])]
param (
# Path to process to start.
... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/DSCResources/ROSSCommon/Src/Get-InstalledProductEntry.ps1 | Get-InstalledProductEntry.ps1 | function Get-InstalledProductEntry {
<#
.NOTES
https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1
#>
[CmdletBinding()]
param (
[Parameter()]
[ValidateNotNullOrEmpty()]
[System.String] $Nam... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/DSCResources/ROSSCommon/Src/Get-RegistryValueIgnoreError.ps1 | Get-RegistryValueIgnoreError.ps1 | function Get-RegistryValueIgnoreError {
<#
.NOTES
https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1
#>
param (
[Parameter(Mandatory)]
[Microsoft.Win32.RegistryHive] $RegistryHive,
[Paramet... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/DSCResources/ROSSCommon/Src/Get-LocalizableRegistryKeyValue.ps1 | Get-LocalizableRegistryKeyValue.ps1 | function Get-LocalizableRegistryKeyValue {
<#
.NOTES
https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1
#>
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[System.Object] $RegistryKey,
... |
PowerShellCorpus/PowerShellGallery/RESONEServiceStore/2.3.0/Examples/RESONEServiceStoreLabExample.ps1 | RESONEServiceStoreLabExample.ps1 | $config = @{
AllNodes = @(
@{
NodeName = 'localhost';
PSDSCAllowPlainTextPassword = $true;
ROSSDatabaseServer = 'controller.lab.local';
ROSSDatabaseName = 'RESONEServiceStore';
ROSSBinariesFolder = 'C:\SharedData\Software\RES\ONE Serv... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.