full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Add-Attachment/Add-Attachment.ps1
Add-Attachment.ps1
function Add-Attachment { <# .Synopsis Adds an attachment a Trello Card. .Description Adds an attachment a Trello Card. #> [cmdletbinding()] param( [parameter( Mandatory=$true, Position=0 )] $Token, [parame...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Get-Label/Get-Label.ps1
Get-Label.ps1
ïŧŋfunction Get-Label { <# .Synopsis Gets all labels on a Trello board. .Description Gets all labels on a Trello board. #> [CmdletBinding(DefaultParameterSetName="All")] param( [parameter( Mandatory=$true, Position=0 )] ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Get-Board/Get-Board.ps1
Get-Board.ps1
function Get-Board { <# .Synopsis Gets all your Trello boards. .Description Gets all your Trello boards. #> [CmdletBinding(DefaultParameterSetName="All")] param( [parameter( Mandatory=$true, Position=0 )] $Token, ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Get-ChecklistItem/Get-ChecklistItem.ps1
Get-ChecklistItem.ps1
function Get-ChecklistItem { <# .Synopsis Gets a Trello Checklists Item. .Description Adds a Trello Checklists Item. #> [cmdletbinding(DefaultParameterSetName="All")] param( [parameter( Mandatory=$true, Position=0 )] ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Get-Checklist/Get-Checklist.ps1
Get-Checklist.ps1
function Get-CheckList { <# .Synopsis Gets all Checklists in a Trello card. .Description Gets all Checklists in a Trello card. #> [CmdletBinding(DefaultParameterSetName="All")] param( [parameter( Mandatory=$true, Position=0 ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/New-Card/New-Card.ps1
New-Card.ps1
function New-Card { <# .Synopsis Adds a new Trello Card. .Description Adds a new Trello Card. #> [cmdletbinding()] param ( [parameter( Mandatory=$true, Position=0 )] $Token, [parameter( Mandato...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Get-Member/Get-Member.ps1
Get-Member.ps1
function Get-Member { <# .Synopsis Gets member of a Trello board. .Description Gets member of a Trello board. #> [CmdletBinding(DefaultParameterSetName="UserName")] param( [parameter( Mandatory=$true, Position=0 )] ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Add-Checklist/Add-Checklist.ps1
Add-Checklist.ps1
function Add-Checklist { <# .Synopsis Adds a new Checklists to a Trello card. .Description Adds a new Checklists to a Trello card. #> [cmdletbinding()] param( [parameter( Mandatory=$true, Position=0 )] $Token, ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Remove-Attachment/Remove-Attachment.ps1
Remove-Attachment.ps1
function Remove-Attachment { <# .Synopsis Removes a Trello Checklist Attachment. .Description Removes a Trello Checklist Attachment. #> [cmdletbinding()] param ( [parameter( Mandatory=$true, Position=0 )] $Token, ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Remove-Card/Remove-Card.ps1
Remove-Card.ps1
function Remove-Card { <# .Synopsis Removes a Trello Card. .Description Removes a Trello Card. #> [cmdletbinding()] param ( [parameter( Mandatory=$true, Position=0 )] $Token, [parameter( Mandato...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/New-Token/New-Token.ps1
New-Token.ps1
function New-Token { <# .Synopsis Logs into Trello and returns a token that may be used to make calls. .Description Logs into Trello and returns a token that may be used to make calls. Use with other commands to work with private boards .Parameter BoardId The id o...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Remove-ChecklistItem/Remove-ChecklistItem.ps1
Remove-ChecklistItem.ps1
function Remove-ChecklistItem { <# .Synopsis Removes a Trello Checklist Item. .Description Removes a Trello Checklist Item. #> [cmdletbinding()] param ( [parameter( Mandatory=$true, Position=0 )] $Token, [pa...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Remove-Checklist/Remove-Checklist.ps1
Remove-Checklist.ps1
function Remove-Checklist { <# .Synopsis Removes a Trello Checklist. .Description Removes a Trello Checklist. #> [cmdletbinding()] param ( [parameter( Mandatory=$true, Position=0 )] $Token, [parameter( ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/New-Board/New-Board.ps1
New-Board.ps1
function New-Board { <# .Synopsis Adds a new Trello Board. .Description Adds a new Trello Board. #> [cmdletbinding()] param( [parameter( Mandatory=$true, Position=0 )] $Token, [parameter( Manda...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/New-Label/New-Label.ps1
New-Label.ps1
function New-Label { <# .Synopsis Creates a new Trello Label. .Description Creates a new Trello Label. #> [cmdletbinding()] param ( [parameter( Mandatory=$true, Position=0 )] $Token, [parameter( ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/Get-List/Get-List.ps1
Get-List.ps1
function Get-List { <# .Synopsis Gets all lists on a Trello board. .Description Gets all lists on a Trello board. #> [CmdletBinding(DefaultParameterSetName="All")] param( [parameter( Mandatory=$true, Position=0 )] ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Functions/New-List/New-List.ps1
New-List.ps1
function New-List { <# .Synopsis Adds a list to a Trello Board. .Description Adds a list to a Trello Board. #> [cmdletbinding()] param( [parameter( Mandatory=$true, Position=0 )] $Token, [parameter( ...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Tests/psgallery.tests.ps1
psgallery.tests.ps1
Describe "Validation of PSGallery" { It "The PowerShell Gallery should be responsive" { $request = [System.Net.WebRequest]::Create("https://www.powershellgallery.com") $response = $Request.GetResponse() $response.StatusCode | Should be OK } }
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Tests/modulemanifest.tests.ps1
modulemanifest.tests.ps1
$ProjectRoot = $ENV:APPVEYOR_BUILD_FOLDER [string[]]$ManifestPath = (Get-ChildItem -Path $ProjectRoot -Include *.psd1 -Recurse).FullName foreach ($Manifest in $ManifestPath) { Describe "Validation of Module Manifest $(Split-Path $Manifest -Leaf)" { It 'Only exports functions listed in the module manifes...
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Tests/PSScriptAnalyzer.ps1
PSScriptAnalyzer.ps1
PowerShellCorpus/PowerShellGallery/TrellOps/1.0.1.24/Tests/appveyor.pester.ps1
appveyor.pester.ps1
param([switch]$Finalize) $PSVersion = $PSVersionTable.PSVersion.Major $TestFile = "TestResults_PS$PSVersion.xml" $ProjectRoot = $ENV:APPVEYOR_BUILD_FOLDER Set-Location $ProjectRoot #Run a test with the native version of PowerShell if(-not $Finalize) { "`tSTATUS: Testing with PowerShell $PSVersion" Im...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Private/Get-ADSIObject.ps1
Get-ADSIObject.ps1
function Get-ADSIObject { <# .SYNOPSIS Get AD object (user, group, etc.) via ADSI. .DESCRIPTION Get AD object (user, group, etc.) via ADSI. Invoke a specify an LDAP Query, or search based on samaccountname and/or objectcategory .FUNCTIONALITY Active Directory ...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Private/Get-ADObjectClass.ps1
Get-ADObjectClass.ps1
function Get-ADObjectClass { [cmdletbinding()] param( $sAMAccountName, $IncludeType = $True ) if($IncludeType) { $Type = ( Get-ADSIObject $sAMAccountName -Property objectClass ).objectClass if($Type.count -gt 0) { switch ($Type[-1]) ...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Private/Get-PropertyOrder.ps1
Get-PropertyOrder.ps1
#function to extract properties Function Get-PropertyOrder { <# .SYNOPSIS Gets property order for specified object .DESCRIPTION Gets property order for specified object .PARAMETER InputObject A single object to convert to an array of property value pairs. .PARA...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Private/Expand-Account.ps1
Expand-Account.ps1
function Expand-Account { [cmdletbinding()] param( $Identity, $Type, [switch]$Recurse, [switch]$Expand ) if($Type -eq 'Group' -and $Expand) { $params = @{ Identity = $Identity } if($Recurse) { $par...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Private/powershell-yaml/Load-Assemblies.ps1
Load-Assemblies.ps1
# Copyright 2016 Cloudbase Solutions Srl # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Public/Get-ADDynamicGroup.ps1
Get-ADDynamicGroup.ps1
Function Get-ADDynamicGroup { <# .SYNOPSIS Parse yaml describing dynamic security groups .DESCRIPTION Parse yaml describing dynamic security groups This parses the yaml without hitting Active Directory .FUNCTIONALITY Active Directory .PARAMETER InputObject ...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Public/Invoke-ADGrouper.ps1
Invoke-ADGrouper.ps1
Function Invoke-ADGrouper { <# .SYNOPSIS Adjust AD group membership based on yaml config files .DESCRIPTION Adjust AD group membership based on yaml config files YAML schema: 'Target Group': # Target security group we are populating Purge: ...
PowerShellCorpus/PowerShellGallery/ADGrouper/0.0.1/Public/Expand-ADDynamicGroup.ps1
Expand-ADDynamicGroup.ps1
Function Expand-ADDynamicGroup { <# .SYNOPSIS Expand dynamic security group definition to describe actions to take .DESCRIPTION Expand dynamic security group definition to describe actions to take Takes the output of Get-ADDynamicGroup and expands this into an array of actions wi...
PowerShellCorpus/PowerShellGallery/PSLeanKit/0.2/PSLeankit.Tests.ps1
PSLeankit.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $DefaultsFile = "$here\PSLeanKit.Pester.Defaults.json" # Load defaults from file (merging into $global:LeanKitPesterTestDefaults if(Test-Path $DefaultsFile){ $defaults = if($global:LeanKitPesterTestDefaults){$global:LeanKitPesterTestDefaults}else{@{}}; ...
PowerShellCorpus/PowerShellGallery/PSLeanKit/0.2/MAKE.ps1
MAKE.ps1
function ZipFiles { param( $zipfilename, $sourcedir ) Add-Type -Assembly System.IO.Compression.FileSystem $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal [System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir, $zipfilename, $compressionLevel, $true) } f...
PowerShellCorpus/PowerShellGallery/PSCode/1.0.2/functions/Invoke-VSCode.ps1
Invoke-VSCode.ps1
<# Match behavior of code.cmd #> function Invoke-VSCode() { [CmdletBinding()] param ($args) PROCESS { $prior1 = $env:ELECTRON_RUN_AS_NODE $prior2 = $env:VSCODE_DEV $env:ELECTRON_RUN_AS_NODE=1 $env:VSCODE_DEV = $null $codePath = join-path $script:vsco...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Private/_SetCertPolicy.ps1
_SetCertPolicy.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Private/_CidrToBin.ps1
_CidrToBin.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Private/_BinToDec.ps1
_BinToDec.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/Get-IBNextAvailableIP.ps1
Get-IBNextAvailableIP.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/Set-IBResourceRecord.ps1
Set-IBResourceRecord.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/Remove-IBResourceRecord.ps1
Remove-IBResourceRecord.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/Get-IBResourceRecord.ps1
Get-IBResourceRecord.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/Add-IBResourceRecordHost.ps1
Add-IBResourceRecordHost.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/Get-IBNetwork.ps1
Get-IBNetwork.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/New-IBNetworkContainer.ps1
New-IBNetworkContainer.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/Request-IBAvailableIP.ps1
Request-IBAvailableIP.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/InfoBlox/1.2.0/Public/New-IBNetwork.ps1
New-IBNetwork.ps1
<# Copyright 2015 Brandon Olin Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software di...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnPseudoParameters.generated.ps1
CfnPseudoParameters.generated.ps1
<# WARNING: THIS FILE IS AUTO-GENERATED! MANUAL CHANGES TO THIS FILE *WILL BE LOST* AFTER THE NEXT AUTO-GENERATION! Generated By: [ebekker] Generated At: [20160322_171703] Generated On: [EZS-001322] Generated W/: [Generate-CfnPseudoParameters.ps1] #> function Use-CfnPseudoParameter { <# .SY...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnResourceProperty.ps1
CfnResourceProperty.ps1
<# .SYNOPSIS Resource properties are additional options that you can specify for a resource. .DESCRIPTION For example, for each Amazon EC2 instance, you must specify an AMI ID for that instance. You declare the AMI ID as a property of the instance. You can add a Resource using either the generic Resource decla...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnTemplate.ps1
CfnTemplate.ps1
<# .SYNOPSIS A template describes your AWS infrastructure. .DESCRIPTION Templates include several major sections. The Resources section is the only section that is required: * Parameters * Mappings * Conditions * Resources * Outputs Some sections in a template can be in any order. However, as you bui...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnMapping.ps1
CfnMapping.ps1
<# .SYNOPSIS The optional Mappings section matches a key to a corresponding set of named values. .DESCRIPTION As an example, if you want to set values based on a region, you can create a mapping that uses the region name as a key and contains the values you want to specify for each specific region. You use the Fn...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnParameter.ps1
CfnParameter.ps1
<# .SYNOPSIS You can use the optional Parameters section to pass values into your template when you create a stack. .DESCRIPTION With parameters, you can create templates that are customized each time you create a stack. Each parameter must contain a value when you create a stack. You can specify a default value...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnOutput.ps1
CfnOutput.ps1
<# .SYNOPSIS The optional Outputs section declares output values that you want to view from the AWS CloudFormation console or that you want to return in response to describe stack calls. .DESCRIPTION For example, you can output the Amazon S3 bucket name for a stack so that you can easily find it. Important Du...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnResources.generated.ps1
CfnResources.generated.ps1
<# WARNING: THIS FILE IS AUTO-GENERATED! MANUAL CHANGES TO THIS FILE *WILL BE LOST* AFTER THE NEXT AUTO-GENERATION! Generated By: [ebekker] Generated At: [20160401_154324] Generated On: [EZS-001322] Generated W/: [Generate-CfnResources.ps1] #> $AWSCFN_RESOURCE_TYPES = @( ,'AWS::AutoScaling::...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnIntrinsicFunctions.ps1
CfnIntrinsicFunctions.ps1
function Use-CfnBase64Function { <# .SYNOPSIS The intrinsic function Fn::Base64 returns the Base64 representation of the input string. This function is typically used to pass encoded data to Amazon EC2 instances by way of the UserData property. .LINK http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnIntrinsicConditionFunctions.ps1
CfnIntrinsicConditionFunctions.ps1
function Use-CfnAndCondition { <# .SYNOPSIS Returns true if all the specified conditions evaluate to true, or returns false if any one of the conditions evaluates to false. Fn::And acts as an AND operator. The minimum number of conditions that you can include is 2, and the maximum is 10. .LINK http://docs.aws.am...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnResourceTag.ps1
CfnResourceTag.ps1
<# .SYNOPSIS You can use the AWS CloudFormation Resource Tags property to apply tags to resources, which can help you identify and categorize those resources. .DESCRIPTION You can tag only resources for which AWS CloudFormation supports tagging. For information about which resources you can tag with AWS CloudForm...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/CfnCondition.ps1
CfnCondition.ps1
<# .SYNOPSIS The optional Conditions section includes statements that define when a resource is created or when a property is defined. .DESCRIPTION As an example, you can compare whether a value is equal to another value. Based on the result of that condition, you can conditionally create resources. You might ...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/IGNORE/CfnTypes.ps1
CfnTypes.ps1
<# We define this type hierarchy to be able to support and enforce some type safety on Resource properties which allow assignment of a typed value literal or an invocation to a function call. #> Add-Type -TypeDefinition @" namespace POSH.AwsCfn { public class CfnPropertyValue { public object Value...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/IGNORE/CfnResource.ps1
CfnResource.ps1
<# .SYNOPSIS Resource properties are additional options that you can specify for a resource. .DESCRIPTION The required Resources section declare the AWS resources that you want as part of your stack, such as an Amazon EC2 instance or an Amazon S3 bucket. You must declare each resource separately; however, you can...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/IGNORE/Generate-CfnDsl.ps1
Generate-CfnDsl.ps1
$RES_PROP_TYPES = @{ String = 'string' Object = 'object' Array = 'array' Number = 'int' } $cfnSchema = ConvertFrom-Json ([System.IO.File]::ReadAllText("$PSScriptRoot\CloudFormationV1.schema")) $resDefs = @{} foreach ($resType in ($cfnSchema.'root-schema-object'.properties.Resources.'c...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/tools/Strip-OrigComments.ps1
Strip-OrigComments.ps1
param([string]$Path) [regex]::Replace( [System.IO.File]::ReadAllText($Path), '\r?\n?[\t ]*<#\(ORIG\)[^>]+#>', '', 'multiline')
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/tools/Format-Json.ps1
Format-Json.ps1
param( [Parameter(ValueFromPipeline)] [string]$JSON, [ValidateSet( ,"2spaces" ## 2 spaces per indent level</option> ,"3spaces" ## 3 spaces per indent level</option> ,"4spaces" ## 4 spaces per indent level</option> ,"compact" ## Compact (1 line)</option> ,"javascript" ## JavaScr...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/gen/Generate-CfnPseudoParameters.ps1
Generate-CfnPseudoParameters.ps1
<# Usage: Generate-CfnPseudoParameters.ps1 > CfnPseudoParameters.generated.ps1 #> $cfnSchema = ConvertFrom-Json ([System.IO.File]::ReadAllText("$PSScriptRoot\CloudFormationV1.schema")) $pseudoParameters = $cfnSchema.'pseudo-parameters' $pseudoDefs = [ordered]@{} foreach ($pseudoProp in ($pseudoParamete...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/gen/Generate-CfnResources.ps1
Generate-CfnResources.ps1
<# Usage: Generate-CfnResources.ps1 > CfnResources.generated.ps1 #> $RES_PROP_TYPES = @{ String = 'string' Object = 'System.Collections.IDictionary' Array = 'array' Number = 'int' Boolean = 'bool' JSON = 'object' Reference = 'string' # http://docs.aws.a...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/examples/RDS_MySQL_With_Read_Replica-annotated.ps1
RDS_MySQL_With_Read_Replica-annotated.ps1
#ipmo -Force AwsCfn <# Adapted from: https://s3.amazonaws.com/cloudformation-templates-us-east-1/RDS_MySQL_With_Read_Replica.template Listed on: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-services-us-east-1.html #> $templateDescription = "AW...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/examples/RDS_MySQL_With_Read_Replica.ps1
RDS_MySQL_With_Read_Replica.ps1
#ipmo -Force AwsCfn <# Adapted from: https://s3.amazonaws.com/cloudformation-templates-us-east-1/RDS_MySQL_With_Read_Replica.template Listed on: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/sample-templates-services-us-east-1.html #> $templateDescription = "AW...
PowerShellCorpus/PowerShellGallery/AwsCfn/0.8.0.4/examples/Wiki-Simple-Sample.ps1
Wiki-Simple-Sample.ps1
#ipmo -Force AwsCfn Template -Description "Sample CloudFormation Template" -JSON -Compress { Parameter DBName String -Default "MyDatabase" ` -MinLength 1 -MaxLength 64 -AllowedPattern "[a-zA-Z][a-zA-Z0-9]*" ` -Description "The database name" ` -ConstraintDescription "must begin with a letter and ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/New-DynamicParam.ps1
New-DynamicParam.ps1
Function New-DynamicParam { <# .SYNOPSIS Helper function to simplify creating dynamic parameters .DESCRIPTION Helper function to simplify creating dynamic parameters Example use cases: Include parameters only if your environment dictates it Include parameter...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Invoke-Sqlcmd2.ps1
Invoke-Sqlcmd2.ps1
function Invoke-Sqlcmd2 { <# .SYNOPSIS Runs a T-SQL script. .DESCRIPTION Runs a T-SQL script. Invoke-Sqlcmd2 runs the whole scipt and only captures the first selected result set, such as the output of PRINT statements when -verbose parameter is specified. Paramaterized queries are s...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Join-Parts.ps1
Join-Parts.ps1
function Join-Parts { <# .SYNOPSIS Join strings with a specified separator. .DESCRIPTION Join strings with a specified separator. This strips out null values and any duplicate separator characters. See examples for clarification. .PARAMETER Separator Separator...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-ADSIObject.ps1
Get-ADSIObject.ps1
function Get-ADSIObject { <# .SYNOPSIS Get AD object (user, group, etc.) via ADSI. .DESCRIPTION Get AD object (user, group, etc.) via ADSI. Invoke a specify an LDAP Query, or search based on samaccountname and/or objectcategory .FUNCTIONALITY Active Directory .PARAMET...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-MSSQLColumn.ps1
Get-MSSQLColumn.ps1
function Get-MSSQLColumn { <# .SYNOPSIS Return details on SQL columns for one or more tables .DESCRIPTION Return details on SQL columns for one or more tables This function depends on Invoke-SQLCMD2. Thanks to Chad Miller and all the contributors! Download this from http:...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Invoke-MySQLQuery.ps1
Invoke-MySQLQuery.ps1
function Invoke-MySQLQuery { <# .SYNOPSIS Runs a SQL script against a MySQL instance .DESCRIPTION Runs a SQL script against a MySQL instance Paramaterized queries are supported. Help details below borrowed from Invoke-Sqlcmd MySQL specific considerations shou...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Open-ISEFunction.ps1
Open-ISEFunction.ps1
function Open-ISEFunction { <# .SYNOPSIS Open a function in ISE .DESCRIPTION Open a function in ISE. Any function that can be obtained by (get-command <command>).definition. Pretty much anything that isn't compiled in a DLL or obfuscated in some other manner. .FUNCTIONALITY ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Invoke-AzureRmVmScript.ps1
Invoke-AzureRmVmScript.ps1
# WARNING: THIS HAS MINIMAL TESTING AND SHOULD BE CONSIDERED EXPERIMENTAL # Use at your own risk, and read through the code before using it function Invoke-AzureRmVmScript { <# .SYNOPSIS Invoke an ad hoc PowerShell script on an AzureRM VM .DESCRIPTION Invoke an ad hoc PowerShell sc...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-PropertyType.ps1
Get-PropertyType.ps1
function Get-PropertyType { <# .SYNOPSIS Extract unique .NET types for properties of one or more objects .PARAMETER InputObject Get properties and their types for each of these .PARAMETER Property If specified, only return unique types for these properties .EXAMPLE ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-ADMigratedSourceObject.ps1
Get-ADMigratedSourceObject.ps1
function Get-ADMigratedSourceObject { <# .SYNOPSIS Find the source account(s) from a migrated target account .DESCRIPTION Find the source account(s) from a migrated target account. If you used ADMT or another migration tool to migrate accounts, this function will help you map out...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Wait-Path.ps1
Wait-Path.ps1
Function Wait-Path { <# .SYNOPSIS Wait for a path to exist .DESCRIPTION Wait for a path to exist Default behavior will throw an error if we time out waiting for the path Passthru behavior will return true or false Behaviors above apply to the set of paths; unless al...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-SQLInstance.ps1
Get-SQLInstance.ps1
Function Get-SQLInstance {   <# .SYNOPSIS Retrieves SQL server information from a local or remote servers. .DESCRIPTION Retrieves SQL server information from a local or remote servers. Pulls all instances from a SQL server and detects if in a cluster or not. ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Add-ObjectDetail.ps1
Add-ObjectDetail.ps1
function Add-ObjectDetail { <# .SYNOPSIS Decorate an object with - A TypeName - New properties - Default parameters .DESCRIPTION Helper function to decorate an object with - A TypeName - New properties - Default paramet...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/ConvertFrom-SID.ps1
ConvertFrom-SID.ps1
function ConvertFrom-SID { <# .SYNOPSIS Convert SID to user or computer account name .DESCRIPTION Convert SID to user or computer account name .PARAMETER SID One or more SIDs to convert .EXAMPLE ConvertFrom-SID S-1-5-21-2139171146-395215898-1246945465-2359 .EXAMPLE 'S-1-5-32-580' | ConverFrom-SID ....
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-UACSetting.ps1
Get-UACSetting.ps1
function Get-UACSetting { <# .SYNOPSIS Get UAC settings .DESCRIPTION Get UAC settings For each computer specified, extract UAC settings from registry. For each registry value, include the value, existing data, default, and boolean for whether existing isDefault If specified, revert the value data ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-GPPShortcut.ps1
Get-GPPShortcut.ps1
Function Get-GPPShortcut { <# .SYNOPSIS Find GPP Shortcut preference items in your current domain. .DESCRIPTION Find GPP Shortcut preference items in your current domain. If no parameter is specified, search all GPOs Requires GroupPolicy module. Get it in the RSAT, en...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-NetworkStatistics.ps1
Get-NetworkStatistics.ps1
function Get-NetworkStatistics { <# .SYNOPSIS Display current TCP/IP connections for local or remote system .FUNCTIONALITY Computers .DESCRIPTION Display current TCP/IP connections for local or remote system. Includes the process ID (PID) and process name for each connection. I...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/New-SQLConnection.ps1
New-SQLConnection.ps1
function New-SqlConnection { <# .SYNOPSIS Creates a SQLConnection to a MS SQL Server instance .DESCRIPTION Creates a SQLConnection to a MS SQL Server instance .PARAMETER ServerInstance SQL Instance to connect to. For default instances, only specify the computer name: "MyComputer...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-ADGroupMembers.ps1
Get-ADGroupMembers.ps1
function Get-ADGroupMembers { <# .SYNOPSIS Return all group members for specified groups. .FUNCTIONALITY Active Directory .DESCRIPTION Return all group members for specified groups. Requires .NET 3.5, does not require RSAT .PARAMETER Group One or more Security Groups ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-GPPFile.ps1
Get-GPPFile.ps1
Function Get-GPPFile { <# .SYNOPSIS Find GPP File preference items in your current domain. .DESCRIPTION Find GPP File preference items in your current domain. If no parameter is specified, we search all GPOs Requires GroupPolicy module. Get it in the RSAT, enable ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-FolderEntry.ps1
Get-FolderEntry.ps1
function Get-FolderEntry { <# .SYNOPSIS Lists all folders under a specified folder regardless of character limitation on path depth. .DESCRIPTION Lists all folders under a specified folder regardless of character limitation on path depth. This is based on Boe's...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-UserSession.ps1
Get-UserSession.ps1
function Get-UserSession { <# .SYNOPSIS Retrieves all user sessions from local or remote computers(s) .DESCRIPTION Retrieves all user sessions from local or remote computer(s). Note: Requires query.exe in order to run Note: This works against Windows Vista and later systems provided the fo...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Import-PSCredential.ps1
Import-PSCredential.ps1
function Import-PSCredential { <# .SYNOPSIS Import credentials from a file .DESCRIPTION Export credentials to a file For use with Import-PSCredential A credential can only be decrypted by the user who encryped it, on the computer where the command was invoked. .PARAMETER P...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Invoke-Parallel.ps1
Invoke-Parallel.ps1
function Invoke-Parallel { <# .SYNOPSIS Function to control parallel processing using runspaces .DESCRIPTION Function to control parallel processing using runspaces Note that each runspace will not have access to variables and commands loaded in your session or in other...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-AzureRmVmPublicIP.ps1
Get-AzureRmVmPublicIP.ps1
Function Get-AzureRmVmPublicIP { <# .SYNOPSIS Correlate AzureRM VMs, NetworkInterfaces, and Public IPs .DESCRIPTION Correlate AzureRM VMs, NetworkInterfaces, and Public IPs Prerequisites: * You have the AzureRM module * You're authenticated ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Export-PSCredential.ps1
Export-PSCredential.ps1
function Export-PSCredential { <# .SYNOPSIS Export credentials to a file .DESCRIPTION Export credentials to a file For use with Import-PSCredential A credential can only be decrypted by the user who encryped it, on the computer where the command was invoked. .PARAMETER Cre...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Invoke-Ping.ps1
Invoke-Ping.ps1
Function Invoke-Ping { <# .SYNOPSIS Ping or test connectivity to systems in parallel .DESCRIPTION Ping or test connectivity to systems in parallel Default action will run a ping against systems If Quiet parameter is specified, we return an array of systems that responded If Detail par...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Test-ForAdmin.ps1
Test-ForAdmin.ps1
function Test-ForAdmin { <# .SYNOPSIS Test whether a specified user is in the administrator role .DESCRIPTION Test whether a specified user is in the administrator role Note: Requires .NET 3.5 or later .PARAMETER username One or more usernames to test. Defaults to the current PowerShell user ($env:...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Test-Credential.ps1
Test-Credential.ps1
function Test-Credential { <# .SYNOPSIS Takes a PSCredential object and validates it .DESCRIPTION Takes a PSCredential object and validates it against a domain or local machine Borrows from a variety of sources online, don't recall which - apologies! .PARAMETER Credential ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Out-DataTable.ps1
Out-DataTable.ps1
function Out-DataTable { <# .SYNOPSIS Creates a DataTable for an object .DESCRIPTION Creates a DataTable based on an object's properties. .PARAMETER InputObject One or more objects to convert into a DataTable .PARAMETER NonNullable A list of columns to set disable AllowDBNull on .INPUTS Object ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/ConvertTo-FlatObject.ps1
ConvertTo-FlatObject.ps1
Function ConvertTo-FlatObject { <# .SYNOPSIS Flatten an object to simplify discovery of data .DESCRIPTION Flatten an object. This function will take an object, and flatten the properties using their full path into a single object with one layer of properties. You can use this to f...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-WinEventData.ps1
Get-WinEventData.ps1
Function Get-WinEventData { <# .SYNOPSIS Get custom event data from an event log record .DESCRIPTION Get custom event data from an event log record Takes in Event Log entries from Get-WinEvent, converts each to XML, extracts all properties from Event.EventData.Data ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Invoke-SQLBulkCopy.ps1
Invoke-SQLBulkCopy.ps1
function Invoke-SQLBulkCopy { <# .SYNOPSIS Use the .NET SQLBulkCopy class to write data to SQL Server tables. .DESCRIPTION Use the .NET SQLBulkCopy class to write data to SQL Server tables. The data source is not limited to SQL Server; any data source can be used, as long as the data can be loaded to ...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/Get-ScheduledTasks.ps1
Get-ScheduledTasks.ps1
function Get-ScheduledTasks { <# .SYNOPSIS Get scheduled task information from a system .DESCRIPTION Get scheduled task information from a system Uses Schedule.Service COM object, falls back to SchTasks.exe as needed. When we fall back to SchTasks, we add empty proper...
PowerShellCorpus/PowerShellGallery/WFTools/0.1.44/New-IPRange.ps1
New-IPRange.ps1
function New-IPRange { <# .SYNOPSIS Returns an array of IP Addresses based on a start and end address .DESCRIPTION Returns an array of IP Addresses based on a start and end address .PARAMETER Start Starting IP Address .PARAMETER End Ending IP Address .PARAMETER Exclude Exclude addresses with thi...