full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Get-HgChangeset.ps1 | Get-HgChangeset.ps1 | <#
.SYNOPSIS
Gets the Hg changeset specified by $Revision
.DESCRIPTION
This function allows you to specify the changeset you are interested in using the $Revision parameter.
Results are returned as an XML object with style specified byYou can specify $Revision in several ways including:
* revset query
* ... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Update-HgRepository.ps1 | Update-HgRepository.ps1 |
function Update-HgRepository
{
<#
.SYNOPSIS
Updates a Mercurial repository.
.DESCRIPTOIN
By default, will update to the latest head of the repository's current branch. Use the `Revision` parameter to update to a specific revision.
When running this command non-interactively, ma... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Add-HgItem.ps1 | Add-HgItem.ps1 |
function Add-HgItem
{
<#
.SYNOPSIS
Adds a file or directory to a Mercurial repository.
.DESCRIPTION
Adds a file or directory to the repository under which it exists.
ALIASES
ahgi, hgadd
.EXAMPLE
Add-HgItem -Path .\Repository\File\to\add.txt
... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Test-HgChangeset.ps1 | Test-HgChangeset.ps1 |
function Test-HgChangeset
{
<#
.SYNOPSIS
Tests if a revision exists in a Mercurial repository.
.DESCRIPTION
The revision to test can be a branch name, revision number, node ID, or revset query. Basically anything that can be passed to the `-r` parameter of Mercurial's `log` command.
... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Test-HgUncommittedChangeset.ps1 | Test-HgUncommittedChangeset.ps1 |
function Test-HgUncommittedChangeset
{
<#
.SYNOPSIS
Tests if there are any uncommitted changes in a repository.
.DESCRIPTION
Checks if there are any modified, added, or removed files in the current directory so that you don't get Mercurial's "abort: uncommitted changes" error message.
... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Sync-HgRepository.ps1 | Sync-HgRepository.ps1 |
function Sync-HgRepository
{
<#
.SYNOPSIS
Synchronizes the current Mercurial repository with its remote source repository.
.DESCRIPTION
The process of pushing your changes to a remote repository usually goes something like this:
PS> hg commit -m "My change are done! Woot!"
... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/New-HgBookmark.ps1 | New-HgBookmark.ps1 | function New-HgBookmark
{
<#
.SYNOPSIS
Adds a bookmark to a repository.
.DESCRIPTION
By default, the bookmark will be added to the current revision. You can add it to a specific revision with the `Revision` parameter.
.EXAMPLE
New-HgBookmark 'NewHgBookmark'
De... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Get-HgIncomingChangeset.ps1 | Get-HgIncomingChangeset.ps1 |
function Get-HgIncomingChangeset
{
<#
.SYNOPSIS
Gets all the incoming changesets for the current directory's repository.
.DESCRIPTION
Returns objects representing the incomingchanges.
ALIASES
ghginc, hgin
.EXAMPLE
Read-HgIncomingChangesets
R... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/New-HgRepository.ps1 | New-HgRepository.ps1 |
function New-HgRepository
{
<#
.SYNOPSIS
Creates a new Mercurial repository.
.DESCRIPTION
Uses Mercurial's init command to create a new repository.
ALIASES
nhg, hginit
.EXAMPLE
Initalize-HgRepository -RepoRoot .\Path\to\New\Repository
Create... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Get-HgTip.ps1 | Get-HgTip.ps1 |
function Get-HgTip
{
<#
.SYNOPSIS
Gets the tip changeset from a repository.
.DESCRIPTION
Returns the tip changeset as an object.
ALIASES
ghgt
.EXAMPLE
Find-HgTip
Gets the tip revision from the repository in the current directory.
... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Redo-HgMerge.ps1 | Redo-HgMerge.ps1 |
function Redo-HgMerge
{
<#
.SYNOPSIS
Re-merges all unresolved files in a Mercurial repository.
.DESCRIPTION
Runs Mercurial's `resolve` command to re-run merges that have unresolved conflicts.
ALIASES
rdhgmg
.EXAMPLE
Redo-HgMerge
Re-merges a... |
PowerShellCorpus/PowerShellGallery/PsHg/0.6.2/Functions/Get-HgBranch.ps1 | Get-HgBranch.ps1 |
function Get-HgBranch
{
<#
.SYNOPSIS
Gets the current branch of a Mercurial repository.
.DESCRIPTION
ALIASES
ghgbr, hgbranch
.EXAMPLE
Get-HgBranch
Returns an object representing the current branch.
#>
[CmdletBinding()]
[OutputType([Ps... |
PowerShellCorpus/PowerShellGallery/Tridion-CoreService/2.3.0.0/Installation/Install.ps1 | Install.ps1 | #Requires -Version 3.0
# Do not continue if there's an error
$ErrorActionPreference = 'Stop';
$branch = 'master';
# Base URL to download the latest version from the internet
$baseDownloadUrl = "https://raw.githubusercontent.com/pkjaer/tridion-powershell-modules/${branch}/CoreService";
# List of all the fi... |
PowerShellCorpus/PowerShellGallery/Tridion-CoreService/2.3.0.0/Installation/Verify.ps1 | Verify.ps1 | function VerifyInstallation
{
Write-Host "Verifying configuration settings...";
Write-Host ""
if (!(Get-Module Tridion-CoreService))
{
Import-Module Tridion-CoreService;
}
$user = Get-TridionUser -ErrorAction SilentlyContinue
if ($user)
{
Write-Host "Everything appears to be working fine." ... |
PowerShellCorpus/PowerShellGallery/Tridion-CoreService/2.3.0.0/Installation/Install-Local.ps1 | Install-Local.ps1 | #Requires -Version 3.0
# Do not continue if there's an error
$ErrorActionPreference = 'Stop';
# List of all the files to install
$directories = @("Clients", "Installation");
$files = @(
'Clients/Tridion.ContentManager.CoreService.Client.2011sp1.dll',
'Clients/Tridion.ContentManager.CoreService.Client.2013... |
PowerShellCorpus/PowerShellGallery/VMware.VimAutomation.vROps/6.5.1.5375723/VMware.VimAutomation.vROps.ps1 | VMware.VimAutomation.vROps.ps1 | [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory]::CoreService.OnImportModule(
"VMware.VimAutomation.vROps.Commands",
(Split-Path $script:MyInvocation.MyCommand.Path));
function global:Get-vROpsCommand([string] $Name = "*") {
get-command -module VMware.VimAutomation.vROps -Name $Name
}
# SIG # ... |
PowerShellCorpus/PowerShellGallery/Jump.Location/0.6.0/Install.ps1 | Install.ps1 | # Adapted from posh-git's install.ps1
# Copyright (c) 2010-2011 Keith Dahlby and contributors
param(
[switch]$WhatIf = $false,
[string] $WhichProfile = $PROFILE.CurrentUserCurrentHost
)
if($PSVersionTable.PSVersion.Major -lt 3) {
Write-Warning "Jump-Location requires PowerShell 3.0 or better; you have ... |
PowerShellCorpus/PowerShellGallery/Jump.Location/0.6.0/TabExpansion.ps1 | TabExpansion.ps1 |
if (Test-Path Function:\TabExpansion) {
Rename-Item Function:\TabExpansion PreJumpTabExpansion
}
function global:TabExpansion($line, $lastWord) {
switch -regex ($line) {
"^(Set-JumpLocation|j|xj) .*" {
[Jump.Location.SetJumpLocationCommand]::GetTabExpansion($line, $lastWord)
}
default {
if (T... |
PowerShellCorpus/PowerShellGallery/Jump.Location/0.6.0/Load.ps1 | Load.ps1 | # Install.ps1
#
# 1. Install Jump-Location
# 2. Setup alias j
# 3. Setup jumpstat alias (function)
# 4. Start watching directory changes
# 5. Register tab expansion
$fullpath = Split-Path -Parent $MyInvocation.MyCommand.Path
$dllpath = $fullpath + "\Jump.Location.dll"
if (-Not (Get-Command Jump-Location -E... |
PowerShellCorpus/PowerShellGallery/PSConfig/1.1.1/Tests/PSConfig.tests.ps1 | PSConfig.tests.ps1 | $ParentPath = Split-Path -Path (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent) -Parent
Import-Module -Name (Join-Path -Path $ParentPath -ChildPath "PSConfig.psm1")
Describe Add-DefaultConfigurationSource {
Clear-ConfigurationSource
InModuleScope PSConfig {
It "Creates a Default Co... |
PowerShellCorpus/PowerShellGallery/InvokeAsSystem/1.0.0.0/Invoke-AsService.ps1 | Invoke-AsService.ps1 | Function Invoke-WithProcessToken {
<#
.SYNOPSIS
Will run a scriptblock with the process token of the specified process.
.DESCRIPTION
The function installs a service and runs it under the NT Authority\SYSTEM credentials.
In this context it will launch powershell.exe with the process token of th... |
PowerShellCorpus/PowerShellGallery/InvokeAsSystem/1.0.0.0/Invoke-AsSystem.ps1 | Invoke-AsSystem.ps1 | Function Invoke-AsSystem {
<#
.SYNOPSIS
Will run a scriptblock with in the context of NT Authority\SYSTEM.
.DESCRIPTION
The function installs a service and runs it under the NT Authority\SYSTEM credentials.
.PARAMETER Process
The PROCESS script block to invoked as a service.
.PARAMETER... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Private/New-ScriptMessage.ps1 | New-ScriptMessage.ps1 | function New-ScriptMessage
{
<#
.SYNOPSIS
Helper Function to show default message used in VERBOSE/DEBUG/WARNING
.DESCRIPTION
Helper Function to show default message used in VERBOSE/DEBUG/WARNING
and... HOST in some case.
This is helpful to standardize the output messages
.PARAMETER Message
... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalServiceCatalog.ps1 | Get-CiresonPortalServiceCatalog.ps1 | function Get-CiresonPortalServiceCatalog
{
<#
.SYNOPSIS
Function to retrieve the Service Catalog for a User
.DESCRIPTION
Function to retrieve the Service Catalog for a User
.EXAMPLE
Get-CiresonPortalServiceCatalog -UserID $User.ID
.EXAMPLE
Get-CiresonPortalServiceCatalog -ServiceOfferingID '14... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Set-CiresonPortalPSConfiguration.ps1 | Set-CiresonPortalPSConfiguration.ps1 | function Set-CiresonPortalPSConfiguration
{
<#
.SYNOPSIS
Function to configure the connection with the Cireson Portal API
.DESCRIPTION
Function to configure the connection with the Cireson Portal API.
This function will basically store the Credential and the API URI into two variables:
-> CiresonP... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserGroup.ps1 | Get-CiresonPortalUserGroup.ps1 | function Get-CiresonPortalUserGroup
{
<#
.SYNOPSIS
Returns a list of all groups.
.DESCRIPTION
Returns a list of all groups.
.EXAMPLE
Get-CiresonPortalUserGroup
Id : 37456f9b-4f69-1611-87eb-026f5b4282d5
Name : fxlab\TESTGROUP
... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalWorkItemClosedByUser.ps1 | Get-CiresonPortalWorkItemClosedByUser.ps1 | function Get-CiresonPortalWorkItemClosedByUser
{
<#
Returns Closed Grid Work Items for User - GetGridWorkItemsMyClosedRequests
Get-CiresonPortalWorkItemClosedByUser -UserID $TestUserGUID -MaxCount 1
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazywin... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserSupportGroupMember.ps1 | Get-CiresonPortalUserSupportGroupMember.ps1 | function Get-CiresonPortalUserSupportGroupMember
{
<#
.SYNOPSIS
Returns a list of members of a support group enumeration.
.EXAMPLE
Get-CiresonPortalSupportGroupMember -SupporGroupID $ID
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazywinadmin
#>
PARAM(
... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserPreference.ps1 | Get-CiresonPortalUserPreference.ps1 | function Get-CiresonPortalUserPreference
{
<#
.EXAMPLE
Get-CiresonPortalUserPreference -UserName francois-xavier.cat
.EXAMPLE
Get-CiresonPortalUserPreference -UserName 'francois-xavier.cat' -Domain 'TestDomain'
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/laz... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUser.ps1 | Get-CiresonPortalUser.ps1 | function Get-CiresonPortalUser
{
<#
.PARAMETER UserID
Returns user related information using the User Id
.PARAMETER SIPAddress
Returns user related information using the SIPAddress
.PARAMETER UserDisplayName
Returns user(s) with specific displayname
.EXAMPLE
Get-CiresonPortal... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Test-CiresonPortalUserIsAuthorized.ps1 | Test-CiresonPortalUserIsAuthorized.ps1 | function Test-CiresonPortalUserIsAuthorized
{
<#
.EXAMPLE
Test-CiresonPortalUserIsAuthorized -UserName 'francois-xavier.cat' -Domain 'TestDomain'
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazywinadmin
#>
#requires -version 3
[CmdletBinding()]
PARAM(
[pa... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalArticle.ps1 | Get-CiresonPortalArticle.ps1 | function Get-CiresonPortalArticle
{
<#
.SYNOPSIS
Function to retrieve the Article (Knowledge Base articke) from the Cireson Portal
.DESCRIPTION
Function to retrieve the Article (Knowledge Base articke) from the Cireson Portal
By default if no parameter is specified, the function will retrieve all t... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalTemplate.ps1 | Get-CiresonPortalTemplate.ps1 | function Get-CiresonPortalTemplate
{
<#
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazywinadmin
#>
[Cmdletbinding(DefaultParameterSetName="All")]
PARAM(
[parameter(Mandatory,ParameterSetName="ClassID")]
[Guid]$ClassID,
[paramet... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserPermission.ps1 | Get-CiresonPortalUserPermission.ps1 | function Get-CiresonPortalUserPermission
{
<#
.EXAMPLE
Get-CiresonPortalUserPermission -UserName 'francois-xavier.cat'
.EXAMPLE
Get-CiresonPortalUserPermission -UserName 'francois-xavier.cat' -Domain 'TestDomain'
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/l... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserRequest.ps1 | Get-CiresonPortalUserRequest.ps1 | function Get-CiresonPortalUserRequest
{
<#
.SYNOPSIS
function to retrieve the WorkItem
#>
PARAM(
[GUID]$UserID)
BEGIN
{
TRY{
Write-Verbose -Message $(New-ScriptMessage -Block BEGIN -message 'Checking Pre-Requisites')
Get-CiresonPortalPSConfiguration -WarningAction Stop... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalRequestOffering.ps1 | Get-CiresonPortalRequestOffering.ps1 | function Get-CiresonPortalRequestOffering
{
<#
.SYNOPSIS
Function to retrieve a specific Request Offering
.DESCRIPTION
Function to retrieve a specific Request Offering
.EXAMPLE
Get-CiresonPortalRequestOffering -RequestOfferingID 4c2e9de8-c70b-c2df-b0d0-a9820391d294
.NOTE... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalConfigurationItem.ps1 | Get-CiresonPortalConfigurationItem.ps1 | function Get-CiresonPortalConfigurationItem
{
<#
.SYNOPSIS
Function to retrieve Configuration Item
.DESCRIPTION
Function to retrieve Configuration Item
.PARAMETER ItemFilter
Specifies the ItemFilter
.NOTES
Francois-Xavier Cat
lazywinadmin.com
@lazywinadmin
github.com/lazywinadmin... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserAnalyst.ps1 | Get-CiresonPortalUserAnalyst.ps1 | function Get-CiresonPortalUserAnalyst
{
<#
.SYNOPSIS
Function to retrieve Analysts
.DESCRIPTION
Function to retrieve Analysts
This function is relying on Get-CiresonPortalUser
.EXAMPLE
Get-CiresonPortalAnalyst
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazyw... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalWorkItemByUserGroup.ps1 | Get-CiresonPortalWorkItemByUserGroup.ps1 | function Get-CiresonPortalWorkItemByUserGroup
{
<#
# Get Work Item for my group (Returns Grid Work Items for User Groups)
Get-CiresonPortalWorkItemByUserGroup -UserID $UserID
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazywinadmin
#>
#requires -versio... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Set-CiresonPortalRequestOfferingAsFavorite.ps1 | Set-CiresonPortalRequestOfferingAsFavorite.ps1 | function Set-CiresonPortalRequestOfferingAsFavorite
{
<#
.SYNOPSYS
Function to set a Request Ofering as Favorite for a specific User
.DESCRIPTION
Function to set a Request Ofering as Favorite for a specific User
.EXAMPLE
Set-CiresonPortalRequestOfferingAsFavorite -RequestOfferingID 4c2e9de8-c70b-c2d... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalWorkItem.ps1 | Get-CiresonPortalWorkItem.ps1 | function Get-CiresonPortalWorkItem
{
<#
.SYNOPSIS
Function to retrieve WorkItem
.DESCRIPTION
Function to retrieve WorkItem
.EXAMPLE
Get-CiresonPortalWorkItemClosedByUser -UserID $TestUserGUID -MaxCount 1
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazy... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserTierQueue.ps1 | Get-CiresonPortalUserTierQueue.ps1 | function Get-CiresonPortalUserTierQueue
{
<#
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazywinadmin
#>
[Cmdletbinding()]
PARAM(
[parameter(Mandatory)]
[Guid]$UserID
)
BEGIN
{
TRY{
Write-Verbose -Message $(New-ScriptM... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalUserSupportGroup.ps1 | Get-CiresonPortalUserSupportGroup.ps1 | Function Get-CiresonPortalUserSupportGroup
{
<#
.SYNOPSIS
Retrieve the SupportGroup for a specific type of WorkItem or Activity
.EXAMPLE
Get-CiresonPortalUserSupportGroup -SupportGroupType ServiceRequest
Id : 030dd483-5d4a-9286-058c-248415b61f7c
Text : QA
Name : QA
... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Search-CiresonPortalServiceCatalog.ps1 | Search-CiresonPortalServiceCatalog.ps1 | function Search-CiresonPortalServiceCatalog
{
<#
.EXAMPLE
Get-ServiceCatalogRO -SearchText "Other Request" -SearchType All
.NOTES
Francois-Xavier Cat
www.lazywinadmin.com
@lazywinadm
github.com/lazywinadmin
#>
#requires -version 3
[CmdletBinding()]
PARAM(
$SearchText,
[Validat... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalEnum.ps1 | Get-CiresonPortalEnum.ps1 | function Get-CiresonPortalEnum
{
<#
.SYNOPSIS
Function to retrieve the item(s) of a specified Enum class
.DESCRIPTION
Function to retrieve the item(s) of a specified Enum class
.PARAMETER ClassID
Specifies the Class ID. the value must be a GUID.
.PARAMETER ItemFilter
Specifies the text st... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalRequestOfferingTop.ps1 | Get-CiresonPortalRequestOfferingTop.ps1 | function Get-CiresonPortalRequestOfferingTop
{
<#
.SYNOPSIS
Function to retrieve Top Request Offering for a User
.DESCRIPTION
Function to retrieve Top Request Offering for a User
.EXAMPLE
Get-CiresonPortalRequestOfferingTop -UserID $User.Id -ReturnAmount 2
.NOTES
Francois-Xavier Cat
www.l... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalWorkItemByUser.ps1 | Get-CiresonPortalWorkItemByUser.ps1 | function Get-CiresonPortalWorkItemItemsByUser
{
<#
.SYNOPSIS
<<<<<<< HEAD
function to retrieve the WorkItem of a User
.DESCRIPTION
function to retrieve the WorkItem of a User
.PARAMETER UserID
Specifies the UserID
.EXAMPLE
Get-CiresonPortalWorkItemItemsByUser -User... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalPSConfiguration.ps1 | Get-CiresonPortalPSConfiguration.ps1 | function Get-CiresonPortalPSConfiguration
{
<#
.SYNOPSIS
Function to get your connection configuration to the Cireson Portal API
.DESCRIPTION
Function to get your connection configuration to the Cireson Portal API
It will verify that the two variables $CiresonPortalURL and $CiresonPortalCred
are pr... |
PowerShellCorpus/PowerShellGallery/CiresonPortalPS/1.0.0.0/Public/Get-CiresonPortalRequestOfferingDetails.ps1 | Get-CiresonPortalRequestOfferingDetails.ps1 | function Get-CiresonPortalRequestOfferingDetails
{
<#
.SYNOPSIS
Function to retrieve a specific Request Offering with more details
.DESCRIPTION
Function to retrieve a specific Request Offering with more details
.EXAMPLE
Get-CiresonPortalRequestOfferingDetails -RequestOfferingID 4c2e9de8-c70b-c2df-b0... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/LongPathFunctions.ps1 | LongPathFunctions.ps1 | ########################################
# Private functions.
########################################
function ConvertFrom-LongFormPath {
[CmdletBinding()]
param([string]$Path)
if ($Path) {
if ($Path.StartsWith('\\?\UNC')) {
# E.g. \\?\UNC\server\share -> \\server\share
... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/OutFunctions.ps1 | OutFunctions.ps1 | # TODO: It would be better if the Out-Default function resolved the underlying Out-Default
# command in the begin block. This would allow for supporting other modules that override
# Out-Default.
$script:outDefaultCmdlet = $ExecutionContext.InvokeCommand.GetCmdlet("Microsoft.PowerShell.Core\Out-Default")
########... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/ServerOMFunctions.ps1 | ServerOMFunctions.ps1 | <#
.SYNOPSIS
Gets assembly reference information.
.DESCRIPTION
Not supported for use during task exection. This function is only intended to help developers resolve the minimal set of DLLs that need to be bundled when consuming the VSTS REST SDK or TFS Extended Client SDK. The interface and output may change betw... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/FindFunctions.ps1 | FindFunctions.ps1 | <#
.SYNOPSIS
Finds files using match patterns.
.DESCRIPTION
Determines the find root from a list of patterns. Performs the find and then applies the glob patterns. Supports interleaved exclude patterns. Unrooted patterns are rooted using defaultRoot, unless matchOptions.matchBase is specified and the pattern is a... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/LocalizationFunctions.ps1 | LocalizationFunctions.ps1 | $script:resourceStrings = @{ }
<#
.SYNOPSIS
Gets a localized resource string.
.DESCRIPTION
Gets a localized resource string and optionally formats the string with arguments.
If the format fails (due to a bad format string or incorrect expected arguments in the format string), then the format string is retur... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/InputFunctions.ps1 | InputFunctions.ps1 | # Hash table of known variable info. The formatted env var name is the lookup key.
#
# The purpose of this hash table is to keep track of known variables. The hash table
# needs to be maintained for multiple reasons:
# 1) to distinguish between env vars and job vars
# 2) to distinguish between secret vars and pu... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/TraceFunctions.ps1 | TraceFunctions.ps1 | <#
.SYNOPSIS
Writes verbose information about the invocation being entered.
.DESCRIPTION
Used to trace verbose information when entering a function/script. Writes an entering message followed by a short description of the invocation. Additionally each bound parameter and unbound argument is also traced.
.PARAM... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/LegacyFindFunctions.ps1 | LegacyFindFunctions.ps1 | <#
.SYNOPSIS
Finds files or directories.
.DESCRIPTION
Finds files or directories using advanced pattern matching.
.PARAMETER LiteralDirectory
Directory to search.
.PARAMETER LegacyPattern
Proprietary pattern format. The LiteralDirectory parameter is used to root any unrooted patterns.
Separate multiple... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/LoggingCommandFunctions.ps1 | LoggingCommandFunctions.ps1 | $script:loggingCommandPrefix = '##vso['
$script:loggingCommandEscapeMappings = @( # TODO: WHAT ABOUT "="? WHAT ABOUT "%"?
New-Object psobject -Property @{ Token = ';' ; Replacement = '%3B' }
New-Object psobject -Property @{ Token = "`r" ; Replacement = '%0D' }
New-Object psobject -Property @{ Token = "`... |
PowerShellCorpus/PowerShellGallery/VstsTaskSdk/0.8.1/ToolFunctions.ps1 | ToolFunctions.ps1 | <#
.SYNOPSIS
Asserts that a path exists. Throws if the path does not exist.
.PARAMETER PassThru
True to return the path.
#>
function Assert-Path {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true)]
[string]$LiteralPath,
[Microsoft.PowerShell.Commands.TestPathType]$PathT... |
PowerShellCorpus/PowerShellGallery/psbbix/0.1.8/epoch-time-convert.ps1 | epoch-time-convert.ps1 | Function convertFrom-epoch {
<#
.Synopsis
Convert from epoch time to human
.Description
Convert from epoch time to human
.Example
convertFrom-epoch 1295113860
.Example
convertFrom-epoch 1295113860 | convertTo-epoch
#>
[CmdletBinding()]
param ([Parameter(ValueFromPipeline=$true)]... |
PowerShellCorpus/PowerShellGallery/psbbix/0.1.8/zabbix-db-size-calc.ps1 | zabbix-db-size-calc.ps1 | #Zabbix DB Size calculator
#https://www.zabbix.com/documentation/2.4/manual/installation/requirements#database_size
function Get-zabbixDBsize {
param ($items, $history, $refreshRate=60, $trendsYears=3, $valuesPerSec)
if (!$psboundparameters.count) {
write-host "Example: get-zabbixDBsize -items 11284 -histor... |
PowerShellCorpus/PowerShellGallery/xRemoteDesktopAdmin/1.1.0.0/Examples/ExampleConfiguration-RemoteDesktopAdmin.ps1 | ExampleConfiguration-RemoteDesktopAdmin.ps1 | Configuration AllowRemoteDesktopAdminConnections
{
Import-DscResource -Module xRemoteDesktopAdmin, xNetworking
Node ('localhost')
{
xRemoteDesktopAdmin RemoteDesktopSettings
{
Ensure = 'Present'
UserAuthentication = 'Secure'
}
xFire... |
PowerShellCorpus/PowerShellGallery/xRemoteDesktopAdmin/1.1.0.0/Examples/ExampleConfiguration-RemoteDesktopAdminWithEncryptedPassword.ps1 | ExampleConfiguration-RemoteDesktopAdminWithEncryptedPassword.ps1 | # The configuration data section specifies which certificate and thumbprint to use for encrypting the password
$ConfigData = @{
AllNodes = @(
@{
NodeName="DSCnode1";
CertificateFile = "C:\Certificates\DSCnode1.cer"
Thumbprint = "E36D15C59BDBABB8525E48568844DD7079C1... |
PowerShellCorpus/PowerShellGallery/xRemoteDesktopAdmin/1.1.0.0/Examples/ExampleConfiguration-RemoteDesktopAdminWithUnEncryptedPassword.ps1 | ExampleConfiguration-RemoteDesktopAdminWithUnEncryptedPassword.ps1 | # The configuration data section specifies to allow using a plain text stored password
$ConfigData = @{
AllNodes = @(
@{
NodeName="DSCnode1";
PSDscAllowPlainTextPassword = $true
}
)}
Configuration AllowRemoteDesktopAdminConnections
{
$password... |
PowerShellCorpus/PowerShellGallery/Use-RawPipeline/1.2/Use-RawPipeline.prepare.ps1 | Use-RawPipeline.prepare.ps1 | Push-Location $PSScriptRoot;
Add-Type -TypeDefinition (Get-Content '.\Helper.Windows.cs' -Encoding 'UTF8' -Raw);
Pop-Location;
|
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/Public/New-PSModule.ps1 | New-PSModule.ps1 | <#
.SYNOPSIS
Scaffolds new module structure.
.DESCRIPTION
Function to initialize and scaffolc the structure for a PowerShell script/function module.
.PARAMETER Name
<String> The name of the module.
.PARAMETER Path
<String> Path to where the module should be created.
.PARAMETER Author
<Stri... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/Public/Install-PSAzureVMModule.ps1 | Install-PSAzureVMModule.ps1 | <#
.SYNOPSIS
A function to install PowerShell Modules from a custom PS Repository on an Azure ARM Virtual Machine.
.DESCRIPTION
A function to isntall PowerShell Modules from a custom PS Repository on an Azure ARM Virtual Machine.
Assuming that some form of PowerShell Repository is available and has mod... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/Public/New-PSFunction.ps1 | New-PSFunction.ps1 | <#
.SYNOPSIS
Creates a new function file.
.DESCRIPTION
Creates a new function file and scaffolds base structure, to the target module.
.PARAMETER Name
<String> The name of the function to create.
.PARAMETER Module
<String> The name of a module, or the parent path of a module manifest.
.PARA... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/Public/New-PSModuleInstallScript.ps1 | New-PSModuleInstallScript.ps1 | <#
.SYNOPSIS
A function to generate an install script for PowerShell modules.
.DESCRIPTION
A function to generate an install script for PowerShell modules. Assuming they
are available to the host and in a PS Repository (NuGet Feed, Fileshare). It can also
be used to generate a template that is mo... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/Public/New-PSPesterTest.ps1 | New-PSPesterTest.ps1 | <#
.SYNOPSIS
Creates a new Pester Test file.
.DESCRIPTION
Function to scaffold the structure of a test file for Pester tests.
.PARAMETER Name
<String> The name of the function to create a test for.
.PARAMETER Module
<String> The name of a module, or the parent path of a module manifest.
.PARAME... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/Public/New-PSBuildPipeline.ps1 | New-PSBuildPipeline.ps1 | <#
.SYNOPSIS
Creates a new build pipeline.
.DESCRIPTION
Creates build pipeline files and scaffolds base structure, to the target module.
.PARAMETER Module
<String> The name of a module, or the parent path of a module manifest.
.NOTES
This scaffolding script is inspired by The PowerShell Build Pi... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_help.ps1 | t_help.ps1 | $HelpFileContent = @"
PSTOPIC
about_<module>
SHORT DESCRIPTION
A short description.
LONG DESCRIPTION
A longer description.
DETAILED DESCRIPTION
A longer more detailed description.
"@ |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_pestertest.ps1 | t_pestertest.ps1 | $PesterFileContent = @"
`$here = (Split-Path -Parent `$MyInvocation.MyCommand.Path).Replace("Tests\<scope>","<module>\<scope>")
`$sut = (Split-Path -Leaf `$MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "`$here\`$sut"
Import-Module (Resolve-Path .\<module>\<module>.psm1) -Force -NoClobber
InModuleSco... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_build_settings.ps1 | t_build_settings.ps1 | $BuildSettingsFileContent = @"
# Settings for build.
param(
`$Artifacts = './artifacts',
`$ModuleName = '<module>',
`$ModulePath = '.\<module>',
`$BuildNumber = `$env:BUILD_NUMBER,
`$PercentCompliance = '50'
)
########################################################################
# Sta... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_build.ps1 | t_build.ps1 | $BuildFileContent = @"
# Include: Settings.
. './<module>.settings.ps1'
# Include: build_utils.
. './build_utils.ps1'
#Synopsis: Run/Publish Tests and Fail Build on Error.
task Test RunTests, ConfirmTestsPassed
#Synopsis: Run full Pipeline.
task . Clean, Analyze, Test, Publish
#Synopsis: Install depend... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/script_template.ps1 | script_template.ps1 | $scriptTemplate = @"
`$repoName = '$RepositoryName'
`$repoPath = '$RepositoryPath'
"@
# Adding drive.
if (!([string]::IsNullOrEmpty($StorageAccountName)) -and !([string]::IsNullOrEmpty($StorageAccountKey))) {
$mapURI = Split-Path $RepositoryPath -Parent
$scriptTemplate += "net use Z: $mapURI /u:AZURE... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_function.ps1 | t_function.ps1 | $FunctionFileContent = @"
<#
.SYNOPSIS
.DESCRIPTION
#>
function <name> {
[CmdletBinding()]
param(
)
process {
}
}
"@ |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_module.ps1 | t_module.ps1 | $ModuleFileContent = @"
# Get public and private function definition files.
`$Public = @(Get-ChildItem -Path `$PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue)
`$Private = @(Get-ChildItem -Path `$PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue)
# Dot source the files
foreach (`$import in @(`$Publ... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_build_utils.ps1 | t_build_utils.ps1 | $BuildUtilsFileContent = @"
<#
.SYNOPSIS
Publishe a PowerShell to a PSRepository.
.DESCRIPTION
This function publishes a module to a PSRepository. It checks the current version on the destination
repository and compares it with the build number. It updates the Module Manifest at publishing.
.NOTES
... |
PowerShellCorpus/PowerShellGallery/PSScaffold/1.0.3/templates/t_gitignore.ps1 | t_gitignore.ps1 | $GitIgnoreFileContent = @"
Thumbs.db
Desktop.ini
artifacts
artifacts/*
PSTestReport
PSTestReport/*
"@ |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Get-WUUninstall.ps1 | Get-WUUninstall.ps1 | Function Get-WUUninstall
{
<#
.SYNOPSIS
Uninstall update.
.DESCRIPTION
Use Get-WUUninstall to uninstall update.
.PARAM KBArticleID
Update ID that will be uninstalled.
.EXAMPLE
Try to uninstall update with specific KBArticleID = KB958830
... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Get-WUList.ps1 | Get-WUList.ps1 | Function Get-WUList
{
<#
.SYNOPSIS
Get list of available updates meeting the criteria.
.DESCRIPTION
Use Get-WUList to get list of available or installed updates meeting specific criteria.
There are two types of filtering update: Pre search criteria, Post search criteria.
- Pre search works on... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Get-WUServiceManager.ps1 | Get-WUServiceManager.ps1 | Function Get-WUServiceManager
{
<#
.SYNOPSIS
Show Service Manager configuration.
.DESCRIPTION
Use Get-WUServiceManager to get available configuration of update services.
.EXAMPLE
Show currently available Windows Update Services on machine.
PS C:\> Get-WU... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Invoke-WUInstall.ps1 | Invoke-WUInstall.ps1 | Function Invoke-WUInstall
{
<#
.SYNOPSIS
Invoke Get-WUInstall remotely.
.DESCRIPTION
Use Invoke-WUInstall to invoke Windows Update install remotly. It Based on TaskScheduler because
CreateUpdateDownloader() and CreateUpdateInstaller() methods can't be called from a remote computer - E_ACCESSDENIED.
... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Get-WURebootStatus.ps1 | Get-WURebootStatus.ps1 | Function Get-WURebootStatus
{
<#
.SYNOPSIS
Show Windows Update Reboot status.
.DESCRIPTION
Use Get-WURebootStatus to check if reboot is needed.
.PARAMETER Silent
Get only status True/False without any more comments on screen.
.EXAMPLE
Check whether restart is necessary... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Update-WUModule.ps1 | Update-WUModule.ps1 | Function Update-WUModule
{
<#
.SYNOPSIS
Invoke Get-WUInstall remotely.
.DESCRIPTION
Use Invoke-WUInstall to invoke Windows Update install remotly. It Based on TaskScheduler because
CreateUpdateDownloader() and CreateUpdateInstaller() methods can't be called from a remote computer - E_ACCESSDENIED.
... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Remove-WUOfflineSync.ps1 | Remove-WUOfflineSync.ps1 | Function Remove-WUOfflineSync
{
<#
.SYNOPSIS
Unregister offline scaner service.
.DESCRIPTION
Use Remove-WUOfflineSync to unregister Windows Update offline scan file (wsusscan.cab or wsusscn2.cab) from current machine.
.EXAMPLE
Check if Offline Sync Service ... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Get-WUInstallerStatus.ps1 | Get-WUInstallerStatus.ps1 | Function Get-WUInstallerStatus
{
<#
.SYNOPSIS
Show Windows Update Installer status.
.DESCRIPTION
Use Get-WUInstallerStatus to show Windows Update Installer status.
.PARAMETER Silent
Get only status True/False without any more comments on screen.
.EXAMPLE
Check if Windows Updat... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Remove-WUServiceManager.ps1 | Remove-WUServiceManager.ps1 | Function Remove-WUServiceManager
{
<#
.SYNOPSIS
Remove windows update service manager.
.DESCRIPTION
Use Remove-WUServiceManager to unregister Windows Update Service Manager.
.PARAMETER ServiceID
An identifier for the service to be unregistered.
.EXAMPLE
Try unregister Microsoft... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Add-WUOfflineSync.ps1 | Add-WUOfflineSync.ps1 | Function Add-WUOfflineSync
{
<#
.SYNOPSIS
Register offline scaner service.
.DESCRIPTION
Use Add-WUOfflineSync to register Windows Update offline scan file. You may use old wsusscan.cab or wsusscn2.cab from Microsoft Baseline Security Analyzer (MSBA) or System Management Server Inventory Tool for Mi... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Get-WUHistory.ps1 | Get-WUHistory.ps1 | Function Get-WUHistory
{
<#
.SYNOPSIS
Get list of updates history.
.DESCRIPTION
Use function Get-WUHistory to get list of installed updates on current machine. It works similar like Get-Hotfix.
.PARAMETER ComputerName
Specify the name of the computer to the remote connection.
... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Hide-WUUpdate.ps1 | Hide-WUUpdate.ps1 | Function Hide-WUUpdate
{
<#
.SYNOPSIS
Get list of available updates meeting the criteria and try to hide/unhide it.
.DESCRIPTION
Use Hide-WUUpdate to get list of available updates meeting specific criteria. In next step script try to hide (or unhide) updates.
There are two types of filtering upd... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Get-WUInstall.ps1 | Get-WUInstall.ps1 | Function Get-WUInstall
{
<#
.SYNOPSIS
Download and install updates.
.DESCRIPTION
Use Get-WUInstall to get list of available updates, next download and install it.
There are two types of filtering update: Pre search criteria, Post search criteria.
- Pre search works on server side, like example: ( ... |
PowerShellCorpus/PowerShellGallery/PSWindowsUpdate/1.5.2.6/Add-WUServiceManager.ps1 | Add-WUServiceManager.ps1 | Function Add-WUServiceManager
{
<#
.SYNOPSIS
Register windows update service manager.
.DESCRIPTION
Use Add-WUServiceManager to register new Windows Update Service Manager.
.PARAMETER ServiceID
An identifier for the service to be registered.
Examples Of ServiceID:
Windows Upd... |
PowerShellCorpus/PowerShellGallery/pposhadmintools/1.0.2/Public/ConvertTo-HashtableFromJSON.ps1 | ConvertTo-HashtableFromJSON.ps1 | function ConvertTo-HashtableFromJSON {
#requires -Version 3.0
<#
.SYNOPSIS
Retrievies json file from disk and converts to hashtable.
.DESCRIPTION
Reads file given as Path parameter and using ConvertTo-HashtableFromPsCustomObject converts it to a hashtable.
.PARAMETER Path
Path... |
PowerShellCorpus/PowerShellGallery/pposhadmintools/1.0.2/Public/ConvertTo-HashtableFromPsCustomObject.ps1 | ConvertTo-HashtableFromPsCustomObject.ps1 | function ConvertTo-HashtableFromPsCustomObject {
#requires -Version 3.0
<#
.SYNOPSIS
Converts any powershell custom object to a custom hashtable.
.DESCRIPTION
Iterates through elements of a custom object and converts them to a corresponding items in a hashtable. Uses recursion to go deep i... |
PowerShellCorpus/PowerShellGallery/InvokeBuild/3.4.0/Invoke-Builds.ps1 | Invoke-Builds.ps1 |
<#
Copyright 2011-2017 Roman Kuzmin
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, so... |
PowerShellCorpus/PowerShellGallery/InvokeBuild/3.4.0/Invoke-Build.ps1 | Invoke-Build.ps1 |
<#
Copyright 2011-2017 Roman Kuzmin
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, so... |
PowerShellCorpus/PowerShellGallery/InvokeBuild/3.4.0/Resolve-MSBuild.ps1 | Resolve-MSBuild.ps1 |
<#PSScriptInfo
.VERSION 1.1.0
.AUTHOR Roman Kuzmin
.COPYRIGHT (c) Roman Kuzmin
.TAGS Invoke-Build, MSBuild
.GUID 53c01926-4fc5-4cbd-aa46-32e415b2373b
.LICENSEURI http://www.apache.org/licenses/LICENSE-2.0
.PROJECTURI https://github.com/nightroman/Invoke-Build
#>
<#
.Synopsis
Finds the specified or lates... |
PowerShellCorpus/PowerShellGallery/PsLANDesk/1.13/Functions/Get-LANDeskColumnSets.ps1 | Get-LANDeskColumnSets.ps1 | Function Get-LANDeskColumnSet
{
<#
.SYNOPSIS
The Get-LANDeskColumnSets function returns a list of available Column sets.
.DESCRIPTION
The Get-LANDeskColumnSets function returns a list of available Column sets. This can be used to determine the columns available to each set.
.PARAMETER ID
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.