full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertFrom-Base64.ps1
ConvertFrom-Base64.ps1
function ConvertFrom-Base64 { <# .SYNOPSIS Decodes a BASE64 encoded string. .DESCRIPTION Decodes a BASE64 encoded string. Input can be either a positional or named parameters of type string or an array of strings. The Cmdlet accepts pipeline input. .EXAMPLE ConvertFrom-Base64 VGhpcyBpcyBhbiBlbmNvZ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertFrom-Hashtable.ps1
ConvertFrom-Hashtable.ps1
function ConvertFrom-Hashtable { <# .SYNOPSIS Converts a hashtable to a PSCustomObject .DESCRIPTION Converts a hashtable to a PSCustomObject Input can be either a positional or named parameters of type hashtable or an array of hashtables. The Cmdlet accepts pipeline input. .EXAMPLE ConvertFrom-Has...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Import-Credential.ps1
Import-Credential.ps1
function Import-Credential { <# .SYNOPSIS Import and decrypt a credential object with a static keyphrase .DESCRIPTION Import and decrypt a credential object with a static keyphrase This Cmdlet lets you import credentials via a static keyphrase from a text file. In contrast to Import-CliXml the SecureStri...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/New-SecurePassword.ps1
New-SecurePassword.ps1
Function New-SecurePassword { [CmdletBinding( HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/New-SecurePassword/' )] [OutputType([string])] PARAM( [Parameter(Mandatory = $false, Position=0)] [int] $Length = 8 , [Parameter(Mandatory = $false, Position=1)] [int] ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertFrom-SecureStringDF.ps1
ConvertFrom-SecureStringDF.ps1
function ConvertFrom-SecureStringDF { [CmdletBinding( HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/ConvertFrom-SecureString/' )] [OutputType([string])] PARAM( [Parameter(ValueFromPipeline = $true, Mandatory = $true, Position=0)] [System.Security.SecureString] $InputObject ) ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/New-CustomErrorRecord.ps1
New-CustomErrorRecord.ps1
Function New-CustomErrorRecord { <# .SYNOPSIS Creates a custom error record. .DESCRIPTION Creates a custom error record. .OUTPUTS This Cmdlet returns a [System.Management.Automation.ErrorRecord] parameter. On failure it returns $null. For more information about output parameters see 'help about_Functions_...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Merge-Hashtable.ps1
Merge-Hashtable.ps1
Function Merge-Hashtable { <# .SYNOPSIS Merges two hashtables and creates a resulting hashtable from both sources. .DESCRIPTION Merges two hashtables and creates a resulting hashtable from both sources. Input can be either a positional or named parameters of type hashtable. You can specify the merge behav...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertFrom-UrlEncoded.ps1
ConvertFrom-UrlEncoded.ps1
Function ConvertFrom-UrlEncoded { <# .SYNOPSIS Decodes a UrlEncoded string. .DESCRIPTION Decodes a UrlEncoded string. Input can be either a positional or named parameters of type string or an array of strings. The Cmdlet accepts pipeline input. .EXAMPLE ConvertFrom-UrlEncoded 'http%3a%2f%2fwww.d-f...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Remove-ActivityProgress.ps1
Remove-ActivityProgress.ps1
function Remove-ActivityProgress { [CmdletBinding( SupportsShouldProcess=$true, ConfirmImpact="Low", HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/Remove-ActivityProgress/' )] Param ( [Parameter(Mandatory = $false)] [switch] $ReturnDetails = $false ) # Param BEGIN { $datBegin = [datetim...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Send-ShortMessage.ps1
Send-ShortMessage.ps1
function Send-ShortMessage { <# .SYNOPSIS Sends a short message (SMS) to a Short Message Provider .DESCRIPTION Sends a short message (SMS) to a Short Message Provider Multiple numbers can be piped to the Cmdlet. Numbers must be in international format (only numbers, no leading zero, '+', space or '-'). ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Expand-CompressedItem.ps1
Expand-CompressedItem.ps1
function Expand-CompressedItem { <# .SYNOPSIS Expands a compressed archive or container. .DESCRIPTION Expands a compressed archive or container. Currently only ZIP files are supported. Per default the contents of the ZIP is expanded in the current directory. If an item already exists, you will be...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Invoke-GenericMethod.ps1
Invoke-GenericMethod.ps1
function Invoke-GenericMethod { <# .SYNOPSIS Invokes a generic method and returns its value. .DESCRIPTION Invokes a generic method and returns its value. The method will be looked up via reflection and converted to a typed non-generic method. The return value of the method will be returned to the caller....
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Export-Credential.ps1
Export-Credential.ps1
function Export-Credential { <# .SYNOPSIS Export and encrypt a credential object with a static keyphrase .DESCRIPTION Export and encrypt a credential object with a static keyphrase This Cmdlet lets you save credentials via a static password to a text file. In contrast to Export-CliXml the SecureString in...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertFrom-CmdletHelp.ps1
ConvertFrom-CmdletHelp.ps1
Function ConvertFrom-CmdletHelp { <# .SYNOPSIS Converts the inline help of a Cmdlet to a Markdown compatible output. .DESCRIPTION Converts the inline help of a Cmdlet to a Markdown compatible output. With this Cmdlet you can publish the inline help of your Cmdlets to markdown compatible repositories o...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Test-StringPattern.ps1
Test-StringPattern.ps1
function Test-StringPattern { [CmdletBinding( HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/Get-ComObjectType/' )] PARAM ( [Parameter(ValueFromPipeline=$true, Mandatory=$true, Position=0)] $InputObject , [Parameter(Mandatory=$false,ParameterSetName='guid')] [switch] $Guid , [Parameter(M...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertFrom-UnicodeHexEncoding.ps1
ConvertFrom-UnicodeHexEncoding.ps1
function ConvertFrom-UnicodeHexEncoding { [CmdletBinding( HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/ConvertFrom-UnicodeHexEncoding/' )] [OutputType([string])] PARAM ( [Parameter(ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, Mandatory = $true, Position = 0)] [String] ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertFrom-PSCustomObject.ps1
ConvertFrom-PSCustomObject.ps1
function ConvertFrom-PSCustomObject { <# .SYNOPSIS Converts a PSCustomObject to a Hashtable .DESCRIPTION Converts a PSCustomObject to a Hashtable Input can be either a positional or named parameters of type PSCustomObject or an array of PSCustomObjects. The Cmdlet accepts pipeline input. .EXAMPLE ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Assert-CmdletDocumentation.ps1
Assert-CmdletDocumentation.ps1
function Assert-CmdletDocumentation { <# .SYNOPSIS Asserts the documentation of a Cmdlet. .DESCRIPTION Asserts the documentation of a Cmdlet. This Cmdlet compares the output from Test-CmdletDocumentation against a file and writes an error if the assertion fails. The asstion file is taken from the spec...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Get-ComObjectType.ps1
Get-ComObjectType.ps1
function Get-ComObjectType { [CmdletBinding( HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/Get-ComObjectType/' )] PARAM( [Parameter(ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, Mandatory = $true, Position=0)] [ref] $InputObject ) BEGIN { $datBegin = [datetime]::...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Get-Constructor.ps1
Get-Constructor.ps1
function Get-Constructor { PARAM ( [type] $Type , [switch] $FullName ) foreach ($c in $Type.GetConstructors()) { "{0}(" -f $Type.FullName; foreach ($p in $c.GetParameters()) { if ($fullName) { "`t{0} {1}," -f $p.ParameterType.FullName, $p.Name; } else { ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Format-Xml.ps1
Format-Xml.ps1
# http://blogs.technet.com/b/jamesone/archive/2010/01/19/how-to-pretty-print-xml-from-powershell-and-output-utf-ansi-and-other-non-unicode-formats.aspx function Format-Xml { [CmdletBinding( HelpURI='http://dfch.biz/biz/dfch/PS/System/Utilities/Format-Xml/' )] [OutputType([string])] PARAM ( [Parameter(...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/ConvertTo-Base64.ps1
ConvertTo-Base64.ps1
Function ConvertTo-Base64 { <# .SYNOPSIS Encodes a BASE64 encoded string. .DESCRIPTION Encodes a BASE64 encoded string. Input can be either a positional or named parameters of type string or an array of strings. The Cmdlet accepts pipeline input. .EXAMPLE ConvertTo-Base64 "This is an encoded strin...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.System.Utilities/2.2.0.20160723/Update-Signature.ps1
Update-Signature.ps1
#Requires -Modules Microsoft.PowerShell.Security function Update-Signature { <# .SYNOPSIS Updates the digital signature of PowerShell scripts. .DESCRIPTION Updates the digital signature of PowerShell scripts. You can either sign all scripts in a given folder or only individual files. .EXAMPLE U...
PowerShellCorpus/PowerShellGallery/PSSecret/1.0.0/PSSecret.tests.ps1
PSSecret.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/PSSecret/1.0.0/Helpers/Export-Cert.ps1
Export-Cert.ps1
$cert = Get-ChildItem Cert:\CurrentUser\My | where friendlyname -eq 'PowershellCMS' # Password to protect the exported certificate that includes a Private Key $mypwd = ConvertTo-SecureString -String 'MySecretString' -Force –AsPlainText # Export certificate with private key and all other properties Export-PfxC...
PowerShellCorpus/PowerShellGallery/PSSecret/1.0.0/Helpers/Write-PowerShellHashTable.ps1
Write-PowerShellHashTable.ps1
function Write-PowerShellHashtable { <# .Synopsis Takes an creates a script to recreate a hashtable .Description Allows you to take a hashtable and create a hashtable you would embed into a script. Handles nested hashtables and indents nested hashtables automatically....
PowerShellCorpus/PowerShellGallery/PSSecret/1.0.0/Helpers/Install-CMSEncryptionCertificate.ps1
Install-CMSEncryptionCertificate.ps1
#Function Install-CMSEncryptionCertificate #{ [Cmdletbinding(SupportsShouldProcess=$true)] param ( [String]$FriendlyName = 'PowerShellCMS', [Parameter(HelpMessage='This is the text that is in the Subject Line of the encryption certificate')] [String]$CMSCertName = "powershellcms@$env:COMPUTER...
PowerShellCorpus/PowerShellGallery/PSSecret/1.0.0/Scripts/Add-CMSSecret.ps1
Add-CMSSecret.ps1
function Add-CMSSecret { <# .Synopsis Adds an encrypted setting to the registry .Description Stores secured user settings in the registry .Example Add-CMSSecret -Name MySimpleString -String 'A String' .Example Add-CMSSecret -Name MyHashTable -Hashtable @{a='b';c='d'} .Example ...
PowerShellCorpus/PowerShellGallery/PSSecret/1.0.0/Scripts/Remove-CMSSecret.ps1
Remove-CMSSecret.ps1
function Remove-CMSSecret { <# .Synopsis Removes an encrypted setting from the registry .Description Removes a stored secured user settings in the registry .Example PS C:\> Get-SPSCMSData -Name EMEA-CortexCredential -Type PSCredential | Remove-SPSCMSData -WhatIf What...
PowerShellCorpus/PowerShellGallery/PSSecret/1.0.0/Scripts/Get-CMSSecret.ps1
Get-CMSSecret.ps1
function Get-CMSSecret { <# .Synopsis Gets encrypted settings stored in the registry .Description Gets encrypted settings stored in the registry .Example Get-CMSSecret The above example gets all encrypted MCS secrets currently stored in the current user's registry....
PowerShellCorpus/PowerShellGallery/xDSCResourceDesigner/1.9.0.0/xDscResourceDesigner.Tests.ps1
xDscResourceDesigner.Tests.ps1
#requires -RunAsAdministrator # Test-xDscResource requires administrator privileges, so we may as well enforce that here. end { Get-Module xDscResourceDesigner -All | Remove-Module -Force Import-Module $PSScriptRoot\xDscResourceDesigner.psd1 -ErrorAction Stop Describe 'xDscResourceDesigner' { ...
PowerShellCorpus/PowerShellGallery/posh-alias/1.0/Posh-Alias.tests.ps1
Posh-Alias.tests.ps1
Import-Module $PSScriptRoot\posh-alias.psm1 Describe "Add-Alias" { Context "With Global Function" { $script:bar = $null function global:Foo($i) { if($i) { $script:bar = $i } else {$script:bar = 1 } } Add-Alias "xyz" "Foo" It "is called without parameter" { $script:bar = 0 ...
PowerShellCorpus/PowerShellGallery/xCredSSP/1.3.0.0/Tests/Unit/MSFT_xCredSSP.tests.ps1
MSFT_xCredSSP.tests.ps1
<# .Synopsis Unit tests for MSFT_xCredSSP .DESCRIPTION Unit tests for MSFT_xCredSSP .NOTES Code in HEADER and FOOTER regions are standard and may be moved into DSCResource.Tools in Future and therefore should not be altered if possible. #> $Global:DSCModuleName = 'xCredSSP' # Example xNe...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/Import-Types.ps1
Import-Types.ps1
#Requires -Version 3.0 <# Create Confluence Objects #> Add-Type -TypeDefinition @" using System; using System.Collections; using System.Collections.Generic; /** * */ namespace Confluence { /** * Confluence.ServerInfo * * https://developer.atlassian.com/confdev/confluence-rest-api/confluen...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Spaces.ps1
Spaces.ps1
#Requires -Version 3.0 <# Spaces #> function Get-ConfluenceSpaces { #Vector<SpaceSummary> getSpaces(String token) - returns all the summaries that the current user can see. #Space getSpace(String token, String spaceKey) - returns a single Space. If the spaceKey does not exist: earlier versions of Confluenc...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Notifications.ps1
Notifications.ps1
#Requires -Version 3.0 <# Notifications #> <#function Set-ConfluenceWatch { #boolean watchPage(String token, long pageId) - watch a page or blog post as the current user, returns false if a space, page or blog is already being watched #boolean watchSpace(String token, String spaceKey) - watch a space as th...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Authentication.ps1
Authentication.ps1
#Requires -Version 3.0 <# Authentications #> function Connect-Confluence { <# .SYNOPSIS Authenticate with a Confluence SOAP or REST API. .DESCRIPTION Log in a user. Returns a String authentication token to be passed as authentication to all other remote...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/UserManagement.ps1
UserManagement.ps1
#Requires -Version 3.0 <# User Management #> function Get-ConfluenceUser { #User getUser(String token, String username) - get a single user #UserInformation getUserInformation(String token, String username) - Retrieves user information #TODO: Vector<String> getActiveUsers(String token, boolean viewAll...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Search.ps1
Search.ps1
#Requires -Version 3.0 <# Search #> function Search-ConfluenceSite { <# .SYNOPSIS Search a Confluence Site .DESCRIPTION Search a Confluence Site .NOTES AUTHOR : Oliver Lipkau <oliver@lipkau.net> VERSION: 0.0.1 - OL - Initial Code 1.0.0 - O...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Blog.ps1
Blog.ps1
#Requires -Version 3.0 <# Blog #> <#function Get-ConfluenceBlogEntry { #Vector<BlogEntrySummary> getBlogEntries(String token, String spaceKey) - returns all the summaries in the space. #BlogEntry getBlogEntry(String token, String pageId) - returns a single entry. #BlogEntry getBlogEntryByDayAndTitle(S...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/General.ps1
General.ps1
#Requires -Version 3.0 <# Helper Functions #> function Set-ConfluenceEndpoint { <# .SYNOPSIS Set API's Endpoint information as default .DESCRIPTION Set API's Endpoint parameters as default parameters in order to avoid having to send them excplicitly with every cal...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Administration.ps1
Administration.ps1
#Requires -Version 3.0 <# Administration #> function Export-ConfluenceSite { <# .SYNOPSIS Export the Confluence Instance to a File .DESCRIPTION Exports a Confluence instance and returns a String holding the URL for the download. The boolean argument indicates whether or no...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Labels.ps1
Labels.ps1
#Requires -Version 3.0 <# Labels #> function Get-ConfluenceLabels { <# .SYNOPSIS Remove Page from Confluence .DESCRIPTION Remove a Page from Confluence .NOTES AUTHOR : Oliver Lipkau <oliver@lipkau.net> VERSION: 0.0.1 - OL - Initial Code 1....
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Pages.ps1
Pages.ps1
#Requires -Version 3.0 <# Pages #> function Get-ConfluencePage { <# .SYNOPSIS Retrieve Page from Confluence .DESCRIPTION Retrieve a single Page or a set of Pages from Confluence .NOTES AUTHOR : Oliver Lipkau <oliver@lipkau.net> V...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Attachement.ps1
Attachement.ps1
#Requires -Version 3.0 <# Attachement #> #Gets are in <Pages/> <#function Add-Confluencettachment { #Attachment addAttachment(String token, long contentId, Attachment attachment, byte[] attachmentData) - add a new attachment to a content entity object. Note that this uses a lot of memory - about 4 times the si...
PowerShellCorpus/PowerShellGallery/PsConfluence/1.1.2.1/XML-RPC/Permissions.ps1
Permissions.ps1
#Requires -Version 3.0 <# Permissions #> function Get-ConfluenceSpacePermissions { <# .SYNOPSIS Retrieve the permissions a User has on a specific Space .DESCRIPTION Retrieve the permissions a User has on a specific Space .NOTES AUTHOR : Olive...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-WmiEventConsumer.ps1
New-WmiEventConsumer.ps1
function New-WmiEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ActiveScriptFileComputerSet')] [Parameter(ParameterSetName = 'ActiveScriptTextComputerSet')] [Parameter(ParameterSetName = 'CommandLineComputerSet')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-NtEventLogEventConsumer.ps1
Get-NtEventLogEventConsumer.ps1
function Get-NtEventLogEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName'...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-ActiveScriptEventConsumer.ps1
New-ActiveScriptEventConsumer.ps1
function New-ActiveScriptEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'FileNameByComputerName')] [Parameter(ParameterSetName = 'ScriptTextByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $Compute...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Register-PermanentWmiEvent.ps1
Register-PermanentWmiEvent.ps1
function Register-PermanentWmiEvent { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ActiveScriptFileComputerSet')] [Parameter(ParameterSetName = 'ActiveScriptTextComputerSet')] [Parameter(ParameterSetName = 'CommandLineComputerS...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-ActiveScriptEventConsumer.ps1
Get-ActiveScriptEventConsumer.ps1
function Get-ActiveScriptEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerNam...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-SmtpEventConsumer.ps1
New-SmtpEventConsumer.ps1
function New-SmtpEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-WmiEventSubscription.ps1
Get-WmiEventSubscription.ps1
function Get-WmiEventSubscription { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-WmiEventFilter.ps1
Get-WmiEventFilter.ps1
function Get-WmiEventFilter { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-WmiEventConsumer.ps1
Get-WmiEventConsumer.ps1
function Get-WmiEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-WmiEventSubscription.ps1
New-WmiEventSubscription.ps1
function New-WmiEventSubscription { [CmdletBinding()] Param( [Parameter(ParameterSetName = 'ComputerByNameSet')] [Parameter(ParameterSetName = 'ComputerByValueSet')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(Parameter...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-WmiEventFilter.ps1
New-WmiEventFilter.ps1
function New-WmiEventFilter { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-CommandLineEventConsumer.ps1
Get-CommandLineEventConsumer.ps1
function Get-CommandLineEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-CimSessionDcom.ps1
New-CimSessionDcom.ps1
function New-CimSessionDcom { [CmdletBinding()] Param( [Parameter()] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Management.Automation.PSCredential] [Management.Automation.CredentialAttribute()] $Credential = [Ma...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-LogFileEventConsumer.ps1
Get-LogFileEventConsumer.ps1
function Get-LogFileEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/Get-SmtpEventConsumer.ps1
Get-SmtpEventConsumer.ps1
function Get-SmtpEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-LogFileEventConsumer.ps1
New-LogFileEventConsumer.ps1
function New-LogFileEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName')] ...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-NtEventLogEventConsumer.ps1
New-NtEventLogEventConsumer.ps1
function New-NtEventLogEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'ByComputerName')] [ValidateNotNullOrEmpty()] [string[]] $ComputerName = 'localhost', [Parameter(ParameterSetName = 'ByComputerName'...
PowerShellCorpus/PowerShellGallery/WmiEvent/1.0.1/Cmdlets/New-CommandLineEventConsumer.ps1
New-CommandLineEventConsumer.ps1
function New-CommandLineEventConsumer { [CmdletBinding()] Param( #region CommonParameters [Parameter(ParameterSetName = 'CommandLineTemplateByComputerName')] [Parameter(ParameterSetName = 'ExecutablePathByComputerName')] [ValidateNotNullOrEmpty()] [string[]] ...
PowerShellCorpus/PowerShellGallery/SCOrchDev-SharePoint/2.1.0/SCOrchDev-SharePoint.tests.ps1
SCOrchDev-SharePoint.tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $manifestPath = "$here\SCOrchDev-SharePoint.psd1" Import-Module SCOrchDev-SharePoint -Force Describe -Tags 'VersionChecks' 'SCOrchDev-PasswordVault manifest' { $script:manifest = $null It 'has a valid manifest' { { $script:ma...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Private/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/BuildHelpers/0.0.45/Private/Invoke-LikeFilter.ps1
Invoke-LikeFilter.ps1
# Helper function to allow like comparison for each item in an array, against a property (or nested property) in a collection function Invoke-LikeFilter { [cmdletbinding()] param( $Collection, # Collection to filter $PropertyName, # Filter on this property in the Collection. If not specified, u...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Private/Get-TeamCityProperties.ps1
Get-TeamCityProperties.ps1
function Get-TeamCityProperties { <# .SYNOPSIS Loads TeamCity system build properties into a hashtable Doesn't do anything if not running under TeamCity .DESCRIPTION Teamcity generates a build properties file and stores the location in the environent variable TEAMCITY_BUILD_PROPE...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Private/Get-InstalledSoftware.ps1
Get-InstalledSoftware.ps1
function Get-InstalledSoftware { <# .SYNOPSIS Pull software details from registry on one or more computers .DESCRIPTION Pull software details from registry on one or more computers. Details: -This avoids the performance impact and potential danger of using the WMI Win32_Product class -The comp...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Add-TestResultToAppveyor.ps1
Add-TestResultToAppveyor.ps1
function Add-TestResultToAppveyor { <# .SYNOPSIS Upload test results to AppVeyor .DESCRIPTION Upload test results to AppVeyor .EXAMPLE Add-TestResultToAppVeyor -TestFile C:\testresults.xml .LINK https://github.com/RamblingCookieMonster/BuildHelpers .LINK ...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-BuildEnvironmentDetail.ps1
Get-BuildEnvironmentDetail.ps1
function Get-BuildEnvironmentDetail { <# .SYNOPSIS Get the details on the build environment .FUNCTIONALITY CI/CD .DESCRIPTION Get the details on the build environment. You might use this to debug a build, particularly in environments not under your control. .PARAMETER Det...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-ModuleFunctions.ps1
Get-ModuleFunctions.ps1
function Get-ModuleFunctions { <# .SYNOPSIS List functions imported by a module .FUNCTIONALITY CI/CD .DESCRIPTION List functions imported by a module. Note that this actually imports the module. .PARAMETER Name Name or path to module to inspect. Defaults to Projec...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-ProjectName.ps1
Get-ProjectName.ps1
function Get-ProjectName { <# .SYNOPSIS Get the name for this project .FUNCTIONALITY CI/CD .DESCRIPTION Get the name for this project Evaluates based on the following scenarios: * Subfolder with the same name as the current folder * Subfolder wi...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Set-ModuleFormats.ps1
Set-ModuleFormats.ps1
function Set-ModuleFormats { <# .SYNOPSIS EXPIRIMENTAL: Set FormatsToProcess [string]$FormatsPath in a module manifest .FUNCTIONALITY CI/CD .DESCRIPTION EXPIRIMENTAL: Set FormatsToProcess [string]$FormatsPath in a module manifest .PARAMETE...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-BuildVariables.ps1
Get-BuildVariables.ps1
function Get-BuildVariables { <# .SYNOPSIS Normalize build system variables .FUNCTIONALITY CI/CD .DESCRIPTION Normalize build system variables Each build system exposes common variables it's own unique way, if at all. This function was written to enable more po...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-PSModuleManifest.ps1
Get-PSModuleManifest.ps1
function Get-PSModuleManifest { <# .SYNOPSIS Get the PowerShell module manifest for a project .FUNCTIONALITY CI/CD .DESCRIPTION Get the PowerShell module manifest for a project Evaluates based on the following scenarios: * Subfolder with the same name as th...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Step-Version.ps1
Step-Version.ps1
<# .SYNOPSIS Increment a Semantic Version .DESCRIPTION Parse a string in the format of MAJOR.MINOR.PATCH and increment the selected digit. .EXAMPLE C:\PS> Step-Version 1.1.1 1.1.2 Will increment the Patch/Build section of the Version .EXAMPLE C:\PS> Step-Version 1.1.1 Minor 1.2.0 ...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Set-BuildEnvironment.ps1
Set-BuildEnvironment.ps1
function Set-BuildEnvironment { <# .SYNOPSIS Normalize build system and project details into environment variables .FUNCTIONALITY CI/CD .DESCRIPTION Normalize build system and project details into environment variables Creates the following environment variables: ...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-GitChangedFile.ps1
Get-GitChangedFile.ps1
function Get-GitChangedFile { <# .SYNOPSIS Get a list of files changed in a git commit .FUNCTIONALITY CI/CD .DESCRIPTION Get a list of files changed in a git commit .PARAMETER Path Path to git repo. Defaults to the current working path .PARAMETER Commit ...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Find-NugetPackage.ps1
Find-NugetPackage.ps1
# All credit and major props to Joel Bennett for this simplified solution that doesn't depend on PowerShellGet # https://gist.github.com/Jaykul/1caf0d6d26380509b04cf4ecef807355 function Find-NugetPackage { <# .SYNOPSIS Query a Nuget feed for details on a package .FUNCTIONALITY CI/CD .D...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-NextNugetPackageVersion.ps1
Get-NextNugetPackageVersion.ps1
function Get-NextNugetPackageVersion { <# .SYNOPSIS Get the next version for a nuget package, such as a module or script in the PowerShell Gallery .FUNCTIONALITY CI/CD .DESCRIPTION Get the next version for a nuget package, such as a module or script in the PowerShell Gallery ...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Invoke-Git.ps1
Invoke-Git.ps1
Function Invoke-Git { <# .SYNOPSIS Wrapper to invoke git.exe and return streams .FUNCTIONALITY CI/CD .DESCRIPTION Wrapper to invoke git.exe and return streams .PARAMETER Arguments If specified, call git with these arguments. This takes a positional argument an...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Set-ModuleFunctions.ps1
Set-ModuleFunctions.ps1
function Set-ModuleFunctions { <# .SYNOPSIS EXPIRIMENTAL: Set FunctionsToExport in a module manifest .FUNCTIONALITY CI/CD .DESCRIPTION EXPIRIMENTAL: Set FunctionsToExport in a module manifest .PARAMETER Name Name or path to module to inspect. Defaults to ProjectPa...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Step-ModuleVersion.ps1
Step-ModuleVersion.ps1
<# .SYNOPSIS Increments the ModuleVersion property in a PowerShell Module Manfiest .DESCRIPTION Reads an existing Module Manifest file and increments the ModuleVersion property. .EXAMPLE C:\PS> Step-ModuleVersion -Path .\testmanifest.psd1 Will increment the Build section of the ModuleVersion .EXAMP...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Public/Get-NextPSGalleryVersion.ps1
Get-NextPSGalleryVersion.ps1
function Get-NextPSGalleryVersion { <# .SYNOPSIS DEPRECATED: Please use Get-NextNugetPackageVersion Get the next version for a module or script in the PowerShell Gallery .FUNCTIONALITY CI/CD .DESCRIPTION DEPRECATED: Please use Get-NextNugetPackageVersion ...
PowerShellCorpus/PowerShellGallery/BuildHelpers/0.0.45/Scripts/Set-BuildVariable.ps1
Set-BuildVariable.ps1
<# .SYNOPSIS Normalize build system and project details into variables .FUNCTIONALITY CI/CD .DESCRIPTION Normalize build system and project details into variables Creates the following variables: BHProjectPath via Get-BuildVariables BHBranchName via Get-BuildVariables ...
PowerShellCorpus/PowerShellGallery/PSReleaseTools/0.5.1.0/Tests/PSReleaseTools.tests.ps1
PSReleaseTools.tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $modRoot = Split-Path -Parent $here | Convert-Path Write-Host "Importing module from $script:modroot" -ForegroundColor magenta Import-Module $modRoot -Force InModuleScope PSReleaseTools { $modPath = get-module psreleasetools | select path | split-path ...
PowerShellCorpus/PowerShellGallery/AzureRM.Resources/3.5.0/ResourceManagerStartup.ps1
ResourceManagerStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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.apach...
PowerShellCorpus/PowerShellGallery/AzureRM.Resources/4.1.0/ResourceManagerStartup.ps1
ResourceManagerStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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.apach...
PowerShellCorpus/PowerShellGallery/AzureRM.Resources/3.8.0/ResourceManagerStartup.ps1
ResourceManagerStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # 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.apach...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/Get-Snapshot.ps1
Get-Snapshot.ps1
function Get-Snapshot { <# .SYNOPSIS Retrieves one or more objects from Cimi. .DESCRIPTION Retrieves one or more objects from Cimi. .OUTPUTS This Cmdlet returns one or more objects from Cimi. On failure it returns $null. .INPUTS See PARAMETER section for a description of input parameters. .EXA...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/Start-Machine.ps1
Start-Machine.ps1
function Start-Machine { <# .SYNOPSIS Performs a specific action to an Cimi object. .DESCRIPTION Performs a specific action to an Cimi object. .OUTPUTS This Cmdlet returns a Job (if async) or a boolean (machine action succeed). On failure it returns $null. .INPUTS See PARAMETER section for a descri...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/Restart-Machine.ps1
Restart-Machine.ps1
function Restart-Machine { <# .SYNOPSIS Performs a specific action to an Cimi object. .DESCRIPTION Performs a specific action to an Cimi object. .OUTPUTS This Cmdlet returns a Job (if async) or a boolean (machine action succeed). On failure it returns $null. .INPUTS See PARAMETER section for a de...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/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.Cimi.Client/3.1.0.20161213/Get-SnapshotTemplate.ps1
Get-SnapshotTemplate.ps1
function Get-SnapshotTemplate { <# .SYNOPSIS Retrieves one or more objects from Cimi. .DESCRIPTION Retrieves one or more objects from Cimi. .OUTPUTS This Cmdlet returns one or more objects from Cimi. On failure it returns $null. .INPUTS See PARAMETER section for a description of input parameters. ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/Stop-Machine.ps1
Stop-Machine.ps1
function Stop-Machine { <# .SYNOPSIS Performs a specific action to an Cimi object. .DESCRIPTION Performs a specific action to an Cimi object. .OUTPUTS This Cmdlet returns a Job (if async) or a boolean (machine action succeed). On failure it returns $null. .INPUTS See PARAMETER section for a descrip...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/Update-Machine.ps1
Update-Machine.ps1
function Update-Machine { <# .SYNOPSIS Updates one or more objects from Cimi. .DESCRIPTION Updates one or more objects from Cimi. .OUTPUTS This Cmdlet returns one or more objects from Cimi. On failure it returns $null. .INPUTS See PARAMETER section for a description of input parameters. .EXAMP...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/Get-Job.ps1
Get-Job.ps1
function Get-Job { <# .SYNOPSIS Retrieves one or more objects from Cimi. .DESCRIPTION Retrieves one or more objects from Cimi. .OUTPUTS This Cmdlet returns one or more objects from Cimi. On failure it returns $null. .INPUTS See PARAMETER section for a description of input parameters. .EXAMPLE ...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/Get-Machine.ps1
Get-Machine.ps1
function Get-Machine { <# .SYNOPSIS Retrieves one or more objects from Cimi. .DESCRIPTION Retrieves one or more objects from Cimi. .OUTPUTS This Cmdlet returns one or more objects from Cimi. On failure it returns $null. .INPUTS See PARAMETER section for a description of input parameters. .EXAM...
PowerShellCorpus/PowerShellGallery/biz.dfch.PS.Cimi.Client/3.1.0.20161213/New-Snapshot.ps1
New-Snapshot.ps1
function New-Snapshot { <# .SYNOPSIS Creates one or more objects from Cimi. .DESCRIPTION Creates one or more objects from Cimi. .OUTPUTS This Cmdlet returns one or more objects from Cimi. On failure it returns $null. .INPUTS See PARAMETER section for a description of input parameters. .EXAMPLE...