full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Remove-JiraUser.ps1
Remove-JiraUser.ps1
function Remove-JiraUser { <# .Synopsis Removes an existing user from JIRA .DESCRIPTION This function removes an existing user from JIRA. WARNING: Deleting a JIRA user may cause database integrity problems. See this article for details: https://confluence.atlassian.com/j...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraProject.ps1
Get-JiraProject.ps1
function Get-JiraProject { <# .Synopsis Returns a project from Jira .DESCRIPTION This function returns information regarding a specified project from Jira. If the Project parameter is not supplied, it will return information about all projects the given user is authorized to view...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/New-JiraSession.ps1
New-JiraSession.ps1
function New-JiraSession { <# .Synopsis Creates a persistent JIRA authenticated session which can be used by other PSJira functions .DESCRIPTION This function creates a persistent, authenticated session in to JIRA which can be used by all other PSJira functions instead of explicitly pas...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Format-Jira.ps1
Format-Jira.ps1
function Format-Jira { <# .Synopsis Converts an object into a table formatted according to JIRA's markdown syntax .DESCRIPTION This function converts a PowerShell object into a table using JIRA's markdown syntax. This can then be added to a JIRA issue description or comment. Like the n...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraConfigServer.ps1
Get-JiraConfigServer.ps1
function Get-JiraConfigServer { <# .Synopsis Obtains the configured URL for the JIRA server .DESCRIPTION This function returns the configured URL for the JIRA server that PSJira should manipulate. By default, this is stored in a config.xml file at the module's root path. .EXAMPLE Ge...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/New-JiraUser.ps1
New-JiraUser.ps1
function New-JiraUser { <# .Synopsis Creates a new user in JIRA .DESCRIPTION This function creates a new user in JIRA. By default, the new user will be notified via e-mail. The new user's password is also randomly generated. .EXAMPLE New-JiraUser -UserName testUser -...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraUser.ps1
Get-JiraUser.ps1
function Get-JiraUser { <# .Synopsis Returns a user from Jira .DESCRIPTION This function returns information regarding a specified user from Jira. .EXAMPLE Get-JiraUser -UserName user1 -Credential $cred Returns information about the user user1 .EXAMPLE Get-ADUser -...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Set-JiraIssueLabel.ps1
Set-JiraIssueLabel.ps1
function Set-JiraIssueLabel { <# .Synopsis Modifies labels on an existing JIRA issue .DESCRIPTION This function modifies labels on an existing JIRA issue. There are four supported operations on labels: * Add: appends additional labels to the labels that an issue already has ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraGroupMember.ps1
Get-JiraGroupMember.ps1
function Get-JiraGroupMember { <# .Synopsis Returns members of a given group in JIRA .DESCRIPTION This function returns members of a provided group in JIRA. .EXAMPLE Get-JiraGroupmember testGroup This example returns all members of the JIRA group testGroup. .EXAMPLE ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Set-JiraUser.ps1
Set-JiraUser.ps1
function Set-JiraUser { <# .Synopsis Modifies user properties in JIRA .DESCRIPTION This function modifies user properties in JIRA, allowing you to change a user's e-mail address, display name, and any other properties supported by JIRA's API. .EXAMPLE Set-JiraUser -User user1...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraIssueCreateMetadata.ps1
Get-JiraIssueCreateMetadata.ps1
function Get-JiraIssueCreateMetadata { <# .Synopsis Returns metadata required to create an issue in JIRA .DESCRIPTION This function returns metadata required to create an issue in JIRA - the fields that can be defined in the process of creating an issue. This can be used to identify custom fi...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Invoke-JiraIssueTransition.ps1
Invoke-JiraIssueTransition.ps1
function Invoke-JiraIssueTransition { <# .Synopsis Performs an issue transition on a JIRA issue, changing its status .DESCRIPTION This function performs an issue transition on a JIRA issue. Transitions are defined in JIRA through workflows, and allow the issue to move from one status ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraFilter.ps1
Get-JiraFilter.ps1
function Get-JiraFilter { <# .Synopsis Returns information about a filter in JIRA .DESCRIPTION This function returns information about a filter in JIRA, including the JQL syntax of the filter, its owner, and sharing status. This function is only capable of returning filters by their Fi...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Add-JiraIssueComment.ps1
Add-JiraIssueComment.ps1
function Add-JiraIssueComment { <# .Synopsis Adds a comment to an existing JIRA issue .DESCRIPTION This function adds a comment to an existing issue in JIRA. You can optionally set the visibility of the comment (All Users, Developers, or Administrators). .EXAMPLE Add-JiraIssueCommen...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Set-JiraIssue.ps1
Set-JiraIssue.ps1
function Set-JiraIssue { <# .Synopsis Modifies an existing issue in JIRA .DESCRIPTION This function modifies an existing isue in JIRA. This can include changing the issue's summary or description, or assigning the issue. .EXAMPLE Set-JiraIssue -Issue TEST-01 -Summary 'Modifi...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraPriority.ps1
Get-JiraPriority.ps1
function Get-JiraPriority { [CmdletBinding()] param( # ID of the priority to get [Parameter(Mandatory = $false)] [Int] $Id, # Credentials to use to connect to Jira [Parameter(Mandatory = $false)] [System.Management.Automation.PSCredential] $Credential ) ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Add-JiraGroupMember.ps1
Add-JiraGroupMember.ps1
function Add-JiraGroupMember { <# .Synopsis Adds a user to a JIRA group .DESCRIPTION This function adds a JIRA user to a JIRA group. .EXAMPLE Add-JiraGroupMember -Group testUsers -User jsmith This example adds the user jsmith to the group testUsers .EXAMPLE Get-Jir...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraIssue.ps1
Get-JiraIssue.ps1
function Get-JiraIssue { <# .Synopsis Returns information about an issue in JIRA. .DESCRIPTION This function obtains references to issues in JIRA. This function can be used to directly query JIRA for a specific issue key or internal issue ID. It can also be used to query JIRA for issue...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraIssueEditMetadata.ps1
Get-JiraIssueEditMetadata.ps1
function Get-JiraIssueEditMetadata { <# .Synopsis Returns metadata required to create an issue in JIRA .DESCRIPTION This function returns metadata required to create an issue in JIRA - the fields that can be defined in the process of creating an issue. This can be used to identify custo...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Set-JiraConfigServer.ps1
Set-JiraConfigServer.ps1
function Set-JiraConfigServer { <# .Synopsis Defines the configured URL for the JIRA server .DESCRIPTION This function defines the configured URL for the JIRA server that PSJira should manipulate. By default, this is stored in a config.xml file at the module's root path. .EXAMPLE Se...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Public/Get-JiraSession.ps1
Get-JiraSession.ps1
function Get-JiraSession { <# .Synopsis Obtains a reference to the currently saved JIRA session .DESCRIPTION This functio obtains a reference to the currently saved JIRA session. This can provide a JIRA session ID, as well as the username used to connect to JIRA. .EXAMPLE Ne...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraUser.ps1
ConvertTo-JiraUser.ps1
function ConvertTo-JiraUser { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject ) process { foreach ($i in $InputObject) { # Write-Debug "[Conver...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraCreateMetaField.ps1
ConvertTo-JiraCreateMetaField.ps1
function ConvertTo-JiraCreateMetaField { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject, [Switch] $ReturnError ) process { foreach ($i in $InputObject) ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraIssueType.ps1
ConvertTo-JiraIssueType.ps1
function ConvertTo-JiraIssueType { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject, [ValidateScript({Test-Path $_})] [String] $ConfigFile, [Switch] $ReturnEr...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraFilter.ps1
ConvertTo-JiraFilter.ps1
function ConvertTo-JiraFilter { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject ) process { foreach ($i in $InputObject) { # Write-Debug '[Conv...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraGroup.ps1
ConvertTo-JiraGroup.ps1
function ConvertTo-JiraGroup { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject ) process { foreach ($i in $InputObject) { # Write-Debug "[Conve...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraProject.ps1
ConvertTo-JiraProject.ps1
function ConvertTo-JiraProject { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject ) process { foreach ($i in $InputObject) { # Write-Debug "Proc...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraEditMetaField.ps1
ConvertTo-JiraEditMetaField.ps1
function ConvertTo-JiraEditMetaField { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject, [Switch] $ReturnError ) process { foreach ($i in $I...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraIssue.ps1
ConvertTo-JiraIssue.ps1
function ConvertTo-JiraIssue { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject, [Switch] $IncludeDebug, [Switch] $ReturnError ) begin { $userFie...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertFrom-Json2.ps1
ConvertFrom-Json2.ps1
function ConvertFrom-Json2 { [CmdletBinding()] param ( [Parameter(Mandatory = $true, ValueFromPipeline = $true, Position = 0)] [Object[]] $InputObject, [Parameter()] [int] $MaxJsonLength = [int]::MaxValue ) begin {...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/Resolve-JiraError.ps1
Resolve-JiraError.ps1
function Resolve-JiraError { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0)] [Object[]] $InputObject, # Write error results to the error stream (Write-Error) instead of to the output stream [Switch] $WriteError ) process { ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraStatus.ps1
ConvertTo-JiraStatus.ps1
function ConvertTo-JiraStatus { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject, [ValidateScript({Test-Path $_})] [String] $ConfigFile ) process { ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraSession.ps1
ConvertTo-JiraSession.ps1
function ConvertTo-JiraSession { [CmdletBinding()] param( [Parameter(Mandatory = $true)] $WebResponse, [Parameter(Mandatory = $true)] $Session, [Parameter(Mandatory = $true)] [String] $Username ) process { $obj = ConvertFrom-Json2 -InputObje...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraTransition.ps1
ConvertTo-JiraTransition.ps1
function ConvertTo-JiraTransition { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject ) process { foreach ($i in $InputObject) { # Write-Debug "[...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraField.ps1
ConvertTo-JiraField.ps1
function ConvertTo-JiraField { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject, [ValidateScript({Test-Path $_})] [String] $ConfigFile, [Switch] $ReturnError ...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraPriority.ps1
ConvertTo-JiraPriority.ps1
function ConvertTo-JiraPriority { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject, [ValidateScript({Test-Path $_})] [String] $ConfigFile, [Switch] $ReturnErr...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraComponent.ps1
ConvertTo-JiraComponent.ps1
function ConvertTo-JiraComponent { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject ) process { foreach ($i in $InputObject) { # Write-Debug "Pr...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/ConvertTo-JiraComment.ps1
ConvertTo-JiraComment.ps1
function ConvertTo-JiraComment { [CmdletBinding()] param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true)] [PSObject[]] $InputObject ) process { foreach ($i in $InputObject) { # Write-Debug "[Con...
PowerShellCorpus/PowerShellGallery/PSJira/1.2.5.251/Internal/Invoke-JiraMethod.ps1
Invoke-JiraMethod.ps1
function Invoke-JiraMethod { #Requires -Version 3 [CmdletBinding(DefaultParameterSetName='UseCredential')] param ( [Parameter(Mandatory = $true)] [ValidateSet('Get','Post','Put','Delete')] [String] $Method, [Parameter(Mandatory = $true)] [String] $URI, [...
PowerShellCorpus/PowerShellGallery/SCOrchDev-Exception/2.2.1/SCOrchDev-Exception.tests.ps1
SCOrchDev-Exception.tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $manifestPath = "$here\SCOrchDev-Exception.psd1" Import-Module SCOrchDev-Exception -Force Describe -Tags 'VersionChecks' 'SCOrchDev-Exception manifest' { $script:manifest = $null It 'has a valid manifest' { { $script:manifest =...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Classes.ps1
Classes.ps1
class LabObject { } class LabOperationSystem : LabObject { [string]$Name [string]$FilePath [string]$UnattendFilePath [string]$ProductKey [LabEnvironment]$Environment [string] ToString() { return $this.Name } [Hashtable] ToMachineConfiguration() { re...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/Generic/Write-Log.ps1
Write-Log.ps1
function Write-Log { param ( $Date = (Get-Date), $Scope, $Message ) Write-Verbose -Message "$Date [$($Scope.MyCommand)] :: $Message" }
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/Generic/Convert-PSObjectToHashtable.ps1
Convert-PSObjectToHashtable.ps1
#Requires -Version 5.0 function Convert-PSObjectToHashtable { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Don''t use ShouldProcess in internal functions.')] param ( [Parameter( Position = 0, ValueFromPipeline = $true, ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/Generic/Test-Administrator.ps1
Test-Administrator.ps1
#Requires -Version 5.0 function Test-Administrator { return (New-Object -TypeName Security.Principal.WindowsPrincipal -ArgumentList ([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator) }
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/Generic/Convert-FromJsonObject.ps1
Convert-FromJsonObject.ps1
#Requires -Version 5.0 function Convert-FromJsonObject { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Don''t use ShouldProcess in internal functions.')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingInvokeExpression', '', Justification = 'Invo...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabMachine/Get-LabMachineConfiguration.ps1
Get-LabMachineConfiguration.ps1
function Get-LabMachineConfiguration { param ( [Parameter(Mandatory = $true)] [LabMachine]$Machine ) return New-Object LabMachine -Property @{ Name = $Machine.Name AdministratorPassword = $(if ($Machine.AdministratorPassword) { $Machine.AdministratorPassword | Conv...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabConfiguration/Publish-ModuleToPullServer.ps1
Publish-ModuleToPullServer.ps1
<# .Synopsis Deploy DSC modules to the pullserver. .DESCRIPTION Publish DSC module using Module Info object as an input. The cmdlet will figure out the location of the module repository using web.config of the pullserver. .EXAMPLE Get-Module <ModuleName> | Publish-ModuleToPullServer #> function ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabConfiguration/Publish-DscModuleAndMof.ps1
Publish-DscModuleAndMof.ps1
<# .Synopsis Package DSC modules and mof configuration document and publish them on an enterprise DSC pull server in the required format. .DESCRIPTION Uses Publish-DSCModulesAndMof function to package DSC modules into zip files with the version info. Publishes the zip modules on "$env:ProgramFiles\Window...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabConfiguration/Publish-MOFToPullServer.ps1
Publish-MOFToPullServer.ps1
<# .Synopsis Deploy DSC Configuration document to the pullserver. .DESCRIPTION Publish Mof file to the pullserver. It takes File Info object as pipeline input. It also auto detects the location of the configuration repository using the web.config of the pullserver. .EXAMPLE Dir <path>\*.mof | Publish-M...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabVM/Add-FilesIntoVirtualHardDisk.ps1
Add-FilesIntoVirtualHardDisk.ps1
#Requires -Version 5.0 function Add-FilesIntoVirtualHardDisk { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'Don''t use ShouldProcess in internal functions.')] param ( [Parameter(Mandatory = $true)] [string]$Path, [Parameter(Mandatory ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabVM/New-UnattendXml.ps1
New-UnattendXml.ps1
function New-UnattendXml { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'Don''t use ShouldProcess in internal functions.')] param ( [string]$TemplateFilePath, [Hashtable]$Property, [string]$Destination ) ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabVM/Remove-LabVMFromDomain.ps1
Remove-LabVMFromDomain.ps1
#Requires -Version 5.0 function Remove-LabVMFromDomain { [CmdletBinding(DefaultParameterSetName = 'MachineName', SupportsShouldProcess = $true, ConfirmImpact = 'High')] param ( [Parameter(Mandatory = $true, ParameterSetName = 'Machine', ValueFromPipeline = $true)] [LabMachine[]]$Machine, ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Internal/LabVM/Update-BootOrder.ps1
Update-BootOrder.ps1
#Requires -Version 5.0 function Update-BootOrder { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'Don''t use ShouldProcess in internal functions.')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justificatio...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabDomain/Get-LabDomain.ps1
Get-LabDomain.ps1
#Requires -Version 5.0 function Get-LabDomain { [CmdletBinding(DefaultParameterSetName = 'EnvironmentName')] param ( [Parameter(Mandatory = $false, Position = 0)] [string[]]$Name, [Parameter(Mandatory = $false, ParameterSetName = 'Environment', ValueFromPipeline = $true)] ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabEnvironment/New-LabEnvironment.ps1
New-LabEnvironment.ps1
#Requires -Version 5.0 function New-LabEnvironment { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'TODO: implement ShouldProcess')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'TODO: imple...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabEnvironment/Set-LabEnvironment.ps1
Set-LabEnvironment.ps1
#Requires -Version 5.0 function Set-LabEnvironment { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'TODO: implement ShouldProcess')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'TODO: imple...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabEnvironment/Register-LabEnvironment.ps1
Register-LabEnvironment.ps1
#Requires -Version 5.0 function Register-LabEnvironment { [CmdletBinding(DefaultParameterSetName = 'EnvironmentPath', SupportsShouldProcess = $true, ConfirmImpact = 'High')] param ( [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'EnvironmentPath')] [string]$Path, ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabEnvironment/Unregister-LabEnvironment.ps1
Unregister-LabEnvironment.ps1
#Requires -Version 5.0 function Unregister-LabEnvironment { [CmdletBinding(DefaultParameterSetName = 'EnvironmentPath', SupportsShouldProcess = $true, ConfirmImpact = 'High')] param ( [Parameter(Mandatory = $true, Position = 0, ParameterSetName = 'EnvironmentPath')] [string]$Path, ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabEnvironment/Get-LabEnvironment.ps1
Get-LabEnvironment.ps1
#Requires -Version 5.0 function Get-LabEnvironment { [CmdletBinding(DefaultParameterSetName = 'EnvironmentName')] param ( [Parameter(Mandatory = $false, Position = 0, ParameterSetName = 'EnvironmentName')] [string[]]$Name, [Parameter(Mandatory = $true, ParameterSetName = 'Environ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabMachine/Get-LabMachine.ps1
Get-LabMachine.ps1
#Requires -Version 5.0 function Get-LabMachine { [CmdletBinding(DefaultParameterSetName = 'EnvironmentName')] param ( [Parameter(Mandatory = $false, Position = 0)] [string[]]$Name, [Parameter(Mandatory = $false, ParameterSetName = 'Environment', ValueFromPipeline = $true)] ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabHostShare/Update-LabHostShare.ps1
Update-LabHostShare.ps1
#Requires -Version 5.0 function Update-LabHostShare { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'TODO: implement ShouldProcess')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'TODO: impl...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabConfiguration/Publish-LabConfiguration.ps1
Publish-LabConfiguration.ps1
#Requires -Version 5.0 function Publish-LabConfiguration { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'TODO: implement ShouldProcess')] [CmdletBinding(DefaultParameterSetName = 'EnvironmentName_DscPullServer')] param ( [Parameter(Mandatory = $tru...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabVM/Remove-LabVM.ps1
Remove-LabVM.ps1
#Requires -Version 5.0 function Remove-LabVM { [CmdletBinding(DefaultParameterSetName = 'MachineName', SupportsShouldProcess = $true, ConfirmImpact = 'High')] param ( [Parameter(Mandatory = $true, ParameterSetName = 'Machine', ValueFromPipeline = $true)] [LabMachine[]]$Machine, [...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabVM/New-LabVM.ps1
New-LabVM.ps1
#Requires -Version 5.0 function New-LabVM { [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseShouldProcessForStateChangingFunctions', '', Justification = 'TODO: implement ShouldProcess')] [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '', Justification = 'TODO: implement Shou...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Functions/LabVM/Enter-LabVMSession.ps1
Enter-LabVMSession.ps1
#Requires -Version 5.0 function Enter-LabVMSession { [CmdletBinding(DefaultParameterSetName = 'MachineName')] param ( [Parameter(Mandatory = $true, ParameterSetName = 'Machine', ValueFromPipeline = $true)] [LabMachine]$Machine, [Parameter(Mandatory = $true, Position = 0, Paramete...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Files/Program Files/WindowsPowerShell/Modules/HyperVLabClient/1.0.0.0/Internal/Write-Log.ps1
Write-Log.ps1
$script:setupFolder = 'C:\Setup' $script:logFilePath = Join-Path $script:setupFolder 'log.txt' function Write-Log { param ( [string]$Level, [string]$Message ) $timestamp = [System.DateTime]::Now.TimeOfDay.ToString() # FATAL, ERROR, WARNING, INFO, DEBUG, TRACE if (!$Lev...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Files/Program Files/WindowsPowerShell/Modules/HyperVLabClient/1.0.0.0/Functions/Initialize-LabVM.ps1
Initialize-LabVM.ps1
function Initialize-LabVM { if ($script:configuration) { ####################################### # Share ####################################### if ($script:configuration.Environment.Host -and $script:configuration.Environment.Host.Share) { $share = $script:configurati...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Files/Program Files/WindowsPowerShell/Modules/HyperVLabClient/1.0.0.0/Functions/Install-LabVMTfsAgent.ps1
Install-LabVMTfsAgent.ps1
function Install-LabVMTfsAgent { param ( [string]$ServerUrl = $script:configuration.TfsServerUrl, [PSCredential]$ServerCredential = $script:domainCredential, [string]$AgentName = $script:configuration.AgentName, [string]$AgentFolder = $script:configuration.AgentFolder, ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Files/Program Files/WindowsPowerShell/Modules/HyperVLabClient/1.0.0.0/Functions/Uninstall-LabVMTfsAgent.ps1
Uninstall-LabVMTfsAgent.ps1
function Uninstall-LabVMTfsAgent { param ( [string]$ServerUrl = $script:configuration.TfsServerUrl, [string]$AgentName = $script:configuration.AgentName, [string]$AgentFolder = $script:configuration.AgentFolder, [string]$WorkFolder = $script:configuration.WorkFolder ) ...
PowerShellCorpus/PowerShellGallery/HyperVLab/0.0.1.40/Files/Setup/SetupComplete.ps1
SetupComplete.ps1
$setupFolder = $PSScriptRoot $logFilePath = Join-Path $setupFolder log.txt ####################################### #region Functions ####################################### function Write-Log { param ( [string]$Level, [string]$Message ) $timestamp = [System.DateTime]::Now.T...
PowerShellCorpus/PowerShellGallery/IseHg/0.1/MenuItems/14-Remove.ps1
14-Remove.ps1
<# .Author Trevor Sullivan .Date 2014-06-17 .Description Adds a PowerShell ISE add-on menu item, which removes a file from a Mercurial repository. #> $DisplayName = '_Remove'; $KeyboardShorcut = 'Ctrl + Shift + V'; $Action = { $ArgumentList = 'remove "{0}"' -f $psISE.Cu...
PowerShellCorpus/PowerShellGallery/IseHg/0.1/MenuItems/11-Add.ps1
11-Add.ps1
<# .Author Trevor Sullivan .Date 2014-06-17 .Description Adds a PowerShell ISE add-on menu item, which invokes a command to add the currently selected file to a Mercurial repository. #> $DisplayName = '_Add'; $KeyboardShorcut = 'Ctrl + Shift + A'; $Action = { $ArgumentL...
PowerShellCorpus/PowerShellGallery/IseHg/0.1/MenuItems/13-Status.ps1
13-Status.ps1
<# .Author Trevor Sullivan .Date 2014-06-17 .Description Adds a PowerShell ISE add-on menu item, which checks the status of a file in a Mercurial repository. #> $DisplayName = '_Status'; $KeyboardShorcut = 'Ctrl + Shift + S'; $Action = { $ArgumentList = 'status "{0}"' -...
PowerShellCorpus/PowerShellGallery/IseHg/0.1/MenuItems/12-Commit.ps1
12-Commit.ps1
<# .Author Trevor Sullivan .Date 2014-06-17 .Description Adds a PowerShell ISE add-on menu item, which invokes a command to commit file changes to a Mercurial repository. #> $DisplayName = '_Commit'; $KeyboardShorcut = 'Ctrl + Shift + C'; $Action = { $CommitMessage = [...
PowerShellCorpus/PowerShellGallery/IseHg/0.1/MenuItems/01-RootMenu.ps1
01-RootMenu.ps1
<# .Author Trevor Sullivan .Date 2014-06-17 .Description Creates the root "Mercurial" add-on menu for the PowerShell ISE, and assigns the menu to a variable called $HgMenu, so that we can add child menu items. #> # Clean up menu [void]($psISE.CurrentPowerShellTab.AddOnsMenu...
PowerShellCorpus/PowerShellGallery/IseHg/0.1/MenuItems/10-Init.ps1
10-Init.ps1
<# .Author Trevor Sullivan .Date 2014-06-17 .Description Adds a PowerShell ISE add-on menu item, which invokes a command to initialize a Mercurial repository at the current working directory. #> $DisplayName = '_Init'; $KeyboardShorcut = 'Ctrl + Shift + I'; $Action = { ...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/Src/Get-ROAEnvironmentGuid.ps1
Get-ROAEnvironmentGuid.ps1
function Get-ROAEnvironmentGuid { <# .SYNOPSIS Retrieves a RES ONE Automation environment GUID from the database. .EXAMPLE Get-ROAEnvironmentGuid -Server CONTROLLER -Database RESONEAutomation -Credential (Get-Credential 'sa') Returns the RES ONE Automation environment GUID from t...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/Src/Get-ROASiteLicense.ps1
Get-ROASiteLicense.ps1
function Get-ROASiteLicense { <# .SYNOPSIS Retrieves a RES ONE Automation site license directory from the database. .EXAMPLE Get-ROASiteLicense -Server CONTROLLER -Database RESONEAutomation -Credential (Get-Credential 'sa') Returns the RES ONE Automation site license from the RES...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/Src/Import-ROABuildingBlock.ps1
Import-ROABuildingBlock.ps1
function Import-ROABuildingBlock { <# .SYNOPSIS Imports a RES ONE Automation building block. .EXAMPLE Import-ROABuildingBlock -Path .\RESAM.xml Imports the 'RESAM.xml' building block into the RES ONE Automation database using the current Windows user credentials. .E...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-ROALicense.ps1
Get-ROALicense.ps1
function Get-ROALicense { <# .SYNOPSIS Retrieves a RES ONE Automation site license from the database. .NOTES This cmdlet currently only support Microsoft SQL servers. #> [CmdletBinding(DefaultParameterSetName = 'SQLAuth')] [OutputType([System.String])] param ( # Dat...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-ROAComponentInstallPath.ps1
Get-ROAComponentInstallPath.ps1
function Get-ROAComponentInstallPath { <# .SYNOPSIS Resolves the installation directory of the specified RES ONE Automation component. #> [CmdletBinding()] [OutputType([System.String])] param ( [Parameter(Mandatory)] [ValidateSet('Agent','Console','Dispatcher')] ...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-ROAEnvironment.ps1
Get-ROAEnvironment.ps1
function Get-ROAEnvironment { <# .SYNOPSIS Retrieves a RES ONE Automation environment GUID from the database. .NOTES This cmdlet currently only support Microsoft SQL servers. #> [CmdletBinding(DefaultParameterSetName = 'SQLAuth')] [OutputType([System.Guid])] param ( ...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Resolve-ROAPackagePath.ps1
Resolve-ROAPackagePath.ps1
function Resolve-ROAPackagePath { <# .SYNOPSIS Resolves the latest RES ONE Automation/Automation Manager installation package. #> [CmdletBinding()] param ( ## The literal file path or root search path [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [System.String]...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Import-ROABuildingBlockFile.ps1
Import-ROABuildingBlockFile.ps1
function Import-ROABuildingBlockFile { <# .SYNOPSIS Imports RES ONE Automation building blocks. #> [CmdletBinding(DefaultParameterSetName = 'Path')] [OutputType([System.Management.Automation.PSCustomObject])] param ( # Specifies a path to one or more locations. Wildcards are perm...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-ROAConsolePath.ps1
Get-ROAConsolePath.ps1
function Get-ROAConsolePath { <# .SYNOPSIS Returns the RES ONE Automation console path. #> [CmdletBinding()] [OutputType([System.String])] param ( ) begin { Assert-ROAComponent -Component 'Console'; } process { $wmcRootPath = Get-ROAComponentInstallPath ...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-WindowsInstallerPackageProperty.ps1
Get-WindowsInstallerPackageProperty.ps1
function Get-WindowsInstallerPackageProperty { <# .SYNOPSIS This cmdlet retrieves product name from a Windows Installer MSI database. .DESCRIPTION This function uses the WindowInstaller COM object to pull all values from the Property table from a MSI package. .NOTES Adapted fr...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Start-WaitProcess.ps1
Start-WaitProcess.ps1
function Start-WaitProcess { <# .SYNOPSIS Starts and waits for a process to exit. .NOTES This is an internal function and shouldn't be called from outside. #> [CmdletBinding(SupportsShouldProcess)] [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSShouldProcess', '')] ...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Register-PInvoke.ps1
Register-PInvoke.ps1
function Register-PInvoke { <# .NOTES Kindly donated by Micorsoft from: https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/564bfba5bb0114623a334e1c7a8842b4996e05a6/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] param ( ) process { ...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-InstalledProductEntry.ps1
Get-InstalledProductEntry.ps1
function Get-InstalledProductEntry { <# .NOTES https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] [OutputType([System.Collections.Hashtable])] param ( [Parameter()] [Valid...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Assert-ROAComponent.ps1
Assert-ROAComponent.ps1
function Assert-ROAComponent { <# .SYNOPSIS Ensures that the RES ONE Automation console is installed. #> [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateSet('Agent','Console','Dispatcher')] [System.String] $Component ) process { if (-no...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-RegistryValueIgnoreError.ps1
Get-RegistryValueIgnoreError.ps1
function Get-RegistryValueIgnoreError { <# .NOTES https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] param ( [Parameter(Mandatory)] [Microsoft.Win32.RegistryHive] $RegistryHive...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/DSCResources/ROACommon/Src/Get-LocalizableRegistryKeyValue.ps1
Get-LocalizableRegistryKeyValue.ps1
function Get-LocalizableRegistryKeyValue { <# .NOTES https://github.com/PowerShell/xPSDesiredStateConfiguration/blob/dev/DSCResources/MSFT_xPackageResource/MSFT_xPackageResource.psm1 #> [CmdletBinding()] param ( [Parameter()] [System.Object] $RegistryKey, [Paramete...
PowerShellCorpus/PowerShellGallery/RESONEAutomation/2.2.1/Examples/RESONEAutomationLabExample.ps1
RESONEAutomationLabExample.ps1
$config = @{ AllNodes = @( @{ NodeName = 'localhost'; PSDSCAllowPlainTextPassword = $true; ROADatabaseServer = 'controller.lab.local'; ROADatabaseName = 'RESONEAutomation'; ROABinaryPath = 'C:\SharedData\Software\RES\ONE Automation 2...
PowerShellCorpus/PowerShellGallery/PSLDAPQueryLogging/1.0/Private/Get-RegValue.ps1
Get-RegValue.ps1
function Get-RegValue { <# .SYNOPSIS Sets the default value (REG_SZ) of the registry key on local or remote computers. .DESCRIPTION Use Get-RegValue to set the default value (REG_SZ) of the registry key on local or remote computers. .PARAMETER ComputerName An array of com...
PowerShellCorpus/PowerShellGallery/PSLDAPQueryLogging/1.0/Private/Set-RegDWord.ps1
Set-RegDWord.ps1
function Set-RegDWord { <# .SYNOPSIS Sets or creates a 32-bit binary number (REG_DWORD) on local or remote computers. .DESCRIPTION Use Set-RegDWord to set or create a 32-bit binary number (REG_DWORD) on local or remote computers. .PARAMETER ComputerName An array of comput...
PowerShellCorpus/PowerShellGallery/PSLDAPQueryLogging/1.0/Public/Get-LDAPQueryLogging.ps1
Get-LDAPQueryLogging.ps1
function Get-LDAPQueryLogging { <# .SYNOPSIS Check the diagnostic LDAP query logging settings on a domain controller .DESCRIPTION Check the diagnostic LDAP query logging settings on a domain controller .FUNCTIONALITY Active Directory .PARAMETER ComputerName ...
PowerShellCorpus/PowerShellGallery/PSLDAPQueryLogging/1.0/Public/Enable-LDAPQueryLogging.ps1
Enable-LDAPQueryLogging.ps1
Function Enable-LDAPQueryLogging { <# .SYNOPSIS Enable diagnostic LDAP query logging on a domain controller .DESCRIPTION Enable diagnostic LDAP query logging on a domain controller We set the Field Engineering data to 5, and set a few parameters to help catch the data ...
PowerShellCorpus/PowerShellGallery/PSLDAPQueryLogging/1.0/Public/Disable-LDAPQueryLogging.ps1
Disable-LDAPQueryLogging.ps1
Function Disable-LDAPQueryLogging { <# .SYNOPSIS Disable diagnostic LDAP query logging on a domain controller .DESCRIPTION Disable diagnostic LDAP query logging on a domain controller We set the Field Engineering data to 0, and set a few parameters back to the defaults ....
PowerShellCorpus/PowerShellGallery/PSLDAPQueryLogging/1.0/Public/Test-LDAPQueryLoggingPrerequisites.ps1
Test-LDAPQueryLoggingPrerequisites.ps1
function Test-LDAPQueryLoggingPrerequisites { <# .SYNOPSIS Check if prerequisites for diagnostic LDAP query logging are in place on a domain controller .DESCRIPTION Check if prerequisites for diagnostic LDAP query logging are in place on a domain controller Prerequisites: ...
PowerShellCorpus/PowerShellGallery/IsilonPlatform/8.0.6/Functions/IsilonPlatformNew.ps1
IsilonPlatformNew.ps1
# The MIT License # # Copyright (c) 2016 Christopher Banck. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, cop...