full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIDomainTrustRelationship.ps1
Get-ADSIDomainTrustRelationship.ps1
function Get-ADSIDomainTrustRelationship { <# .SYNOPSIS Function to retrieve the Trust relationship of a domain. Current one by default. .DESCRIPTION Function to retrieve the Trust relationship of a domain. Current one by default. .PARAMETER Credential Specifies the alternative credential to use....
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Add-ADSIGroupMember.ps1
Add-ADSIGroupMember.ps1
function Add-ADSIGroupMember { <# .SYNOPSIS Function to add a group member .DESCRIPTION Function to add a group member .PARAMETER Identity Specifies the Identity of the group You can provide one of the following properties DistinguishedName Guid Name Sa...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Remove-ADSIUser.ps1
Remove-ADSIUser.ps1
function Remove-ADSIUser { <# .SYNOPSIS Function to delete a User Account .DESCRIPTION Function to delete a User Account .PARAMETER Identity Specifies the Identity of the User. You can provide one of the following properties DistinguishedName Guid Name SamAccountName Sid UserPrincip...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIReplicaForestInfo.ps1
Get-ADSIReplicaForestInfo.ps1
function Get-ADSIReplicaForestInfo { <# .SYNOPSIS Get-ADSIReplicaForestInfo returns information about the connected DC's Forest. .DESCRIPTION Get-ADSIForestInfo returns information about the connected DC's Forest. .PARAMETER ComputerName Defines the remote computer to connec...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Move-ADSIDomainControllerRole.ps1
Move-ADSIDomainControllerRole.ps1
function Move-ADSIDomainControllerRole { <# .SYNOPSIS Function to transfers or Seizes Active Directory roles to the current DC. .DESCRIPTION Function to transfers or Seizes Active Directory roles to the current DC. .PARAMETER ComputerName Specifies the Domain Controller .PARAMETER Credential...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Move-ADSIDomainControllerToSite.ps1
Move-ADSIDomainControllerToSite.ps1
function Move-ADSIDomainControllerToSite { <# .SYNOPSIS Move-ADSIDomainControllerToSite moves the current DC to another site. .DESCRIPTION Move-ADSIDomainControllerToSite moves the current DC to another site. MSDN Documention on 'DirectoryServer.MoveToAnotherSite Method' https://msdn.microsoft....
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Remove-ADSIGroup.ps1
Remove-ADSIGroup.ps1
function Remove-ADSIGroup { <# .SYNOPSIS function to remove a group .DESCRIPTION function to remove a group .PARAMETER Identity Specifies the Identity You can provide one of the following properties DistinguishedName Guid Name SamAccountName Sid UserPrincipalName ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Reset-ADSIUserPasswordAge.ps1
Reset-ADSIUserPasswordAge.ps1
function Reset-ADSIUserPasswordAge { <# .SYNOPSIS Function to reset a User's password age to zero .DESCRIPTION Function to reset a User's password age to zero .PARAMETER Identity Specifies the Identity .PARAMETER Credential Specifies alternative credential .EXAMPLE Reset-ADSIUserP...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/New-ADSIPrincipalContext.ps1
New-ADSIPrincipalContext.ps1
function New-ADSIPrincipalContext { <# .SYNOPSIS Function to create an Active Directory PrincipalContext object .DESCRIPTION Function to create an Active Directory PrincipalContext object .PARAMETER Credential Specifies the alternative credentials to use. It will use the current credential if ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIGroupMember.ps1
Get-ADSIGroupMember.ps1
function Get-ADSIGroupMember { <# .SYNOPSIS Function to retrieve the members from a specific group in Active Directory .DESCRIPTION Function to retrieve the members from a specific group in Active Directory .PARAMETER Identity Specifies the Identity of the Group You can provide one of the following ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIReplicaGCInfo.ps1
Get-ADSIReplicaGCInfo.ps1
function Get-ADSIReplicaGCInfo { <# .SYNOPSIS Get-ADSIReplicaGCInfo finds out if a given DC holds the GC role. .DESCRIPTION Get-ADSIReplicaGCInfo finds out if a given DC holds the Global Catalog role. .PARAMETER ComputerName Defines the remote computer to connect to. .PARAM...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Enable-ADSIComputer.ps1
Enable-ADSIComputer.ps1
function Enable-ADSIComputer { <# .SYNOPSIS Function to enable a Computer Account .DESCRIPTION Function to enable a Computer Account .PARAMETER Identity Specifies the Identity of the Computer. You can provide one of the following properties DistinguishedName Guid Name SamAcc...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Enable-ADSIUser.ps1
Enable-ADSIUser.ps1
function Enable-ADSIUser { <# .SYNOPSIS Function to Enable a User Account .DESCRIPTION Function to Enable a User Account .PARAMETER Identity Specifies the Identity of the User. You can provide one of the following properties DistinguishedName Guid Name SamAccountName Sid...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSISiteSubnet.ps1
Get-ADSISiteSubnet.ps1
function Get-ADSISiteSubnet { <# .SYNOPSIS Function to retrieve the Active Directory Site subnets .DESCRIPTION Function to retrieve the Active Directory Site subnets .PARAMETER Credential Specifies alternative credential to use. Default is the current user. .PARAMETER ForestName Specifies...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/New-ADSIUser.ps1
New-ADSIUser.ps1
function New-ADSIUser { <# .SYNOPSIS Function to create a new User .DESCRIPTION Function to create a new User .PARAMETER SamAccountName Specifies the SamAccountName parameter .PARAMETER AccountPassword Specifies the password parameter .PARAMETER Enabled Specifies if the user nee...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIDomainRoot.ps1
Get-ADSIDomainRoot.ps1
function Get-ADSIDomainRoot { <# .SYNOPSIS Function to retrieve the Domain Root in the Forest .DESCRIPTION Function to retrieve the Domain Root in the Forest .PARAMETER Credential Specifies the alternative credential to use. Default is the current one. .PARAMETER ForestName Specifies the ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIGroupManagedBy.ps1
Get-ADSIGroupManagedBy.ps1
function Get-ADSIGroupManagedBy { <# .SYNOPSIS This function retrieve the group that the current user manage in the ActiveDirectory. Typically the function will search for group(s) and look at the 'ManagedBy' property where it matches the current user. .PARAMETER SamAccountName Specify the SamAccountName o...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/New-ADSISite.ps1
New-ADSISite.ps1
function New-ADSISite { <# .SYNOPSIS Function to create a new Site .DESCRIPTION Function to create a new Site .PARAMETER SiteName Specifies the SiteName .PARAMETER Location Specifies the Location of the site .PARAMETER Credential Specifies the alternative credential to use. By ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Test-ADSIUserIsGroupMember.ps1
Test-ADSIUserIsGroupMember.ps1
function Test-ADSIUserIsGroupMember { <# .SYNOPSIS This function will check if a domain user is member of a domain group .EXAMPLE Test-ADSIUserIsGroupMember -GroupSamAccountName TestGroup -UserSamAccountName Fxcat This will return $true or $false depending if the user Fxcat is member of TestGroup...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Enable-ADSIDomainControllerGlobalCatalog.ps1
Enable-ADSIDomainControllerGlobalCatalog.ps1
function Enable-ADSIDomainControllerGlobalCatalog { <# .SYNOPSIS Function to enable the Global Catalog role on a Domain Controller .DESCRIPTION Function to enable the Global Catalog role on a Domain Controller .PARAMETER ComputerName Specifies the Domain Controller .PARAMETER Credential S...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Test-ADSICredential.ps1
Test-ADSICredential.ps1
function Test-ADSICredential { <# .SYNOPSIS Function to test credential .DESCRIPTION Function to test credential .PARAMETER AccountName Specifies the AccountName to check .PARAMETER Password Specifies the AccountName's password .EXAMPLE Test-ADCredential -AccountName 'Xavier' -Pas...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Move-ADSIUser.ps1
Move-ADSIUser.ps1
function Move-ADSIUser { <# .SYNOPSIS Function to move a User in Active Directory .DESCRIPTION Function to move a User in Active Directory .PARAMETER Identity Specifies the Identity of the User You can provide one of the following properties DistinguishedName Guid Name SamAc...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Move-ADSIComputer.ps1
Move-ADSIComputer.ps1
function Move-ADSIComputer { <# .SYNOPSIS Function to Move a Computer in Active Directory .DESCRIPTION Function to Move a Computer in Active Directory .PARAMETER Identity Specifies the Identity of the computer You can provide one of the following: DistinguishedName Guid Name ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/New-ADSIDirectoryContext.ps1
New-ADSIDirectoryContext.ps1
function New-ADSIDirectoryContext { <# .SYNOPSIS Function to create an Active Directory DirectoryContext objects .DESCRIPTION Function to create an Active Directory DirectoryContext objects .PARAMETER Credential Specifies the alternative credentials to use. It will use the current credential i...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/New-ADSIGroup.ps1
New-ADSIGroup.ps1
function New-ADSIGroup { <# .SYNOPSIS function to create a new group .DESCRIPTION function to create a new group .PARAMETER Name Specifies the property Name .PARAMETER DisplayName Specifies the property DisplayName .PARAMETER UserPrincipalName Specifies the property UserPrincipalN...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIForestTrustRelationship.ps1
Get-ADSIForestTrustRelationship.ps1
function Get-ADSIForestTrustRelationship { <# .SYNOPSIS Function to retrieve the Forest Trust Relationship(s) .DESCRIPTION Function to retrieve the Forest Trust Relationship(s) .PARAMETER Credential Specifies the alternative credential to use. Default is the current user. .PARAMETER ForestNa...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIDomainMode.ps1
Get-ADSIDomainMode.ps1
Function Get-ADSIDomainMode { <# .SYNOPSIS Function to retrieve Domain mode .DESCRIPTION Function to retrieve Domain mode .PARAMETER Credential Specifies alternative credential .PARAMETER DomainName Specifies the Domain Name where the function should look .EXAMPLE Get-ADSIDomainMode .EXAMPLE...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIReplicaInfo.ps1
Get-ADSIReplicaInfo.ps1
function Get-ADSIReplicaInfo { <# .SYNOPSIS Get-ADSIReplicaInfo retrieves Active Directory replication information .DESCRIPTION Get-ADSIReplicaInfo connects to an Active Directory Domain Controller and retrieves Active Directory replication information such as latency of replication an...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIDomain.ps1
Get-ADSIDomain.ps1
Function Get-ADSIDomain { <# .SYNOPSIS Function to retrieve the current or specified domain .DESCRIPTION Function to retrieve the current or specified domain .PARAMETER Credential Specifies alternative credential to use .PARAMETER ForestName Specifies the DomainName to query .EXAMPLE...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Disable-ADSIComputer.ps1
Disable-ADSIComputer.ps1
function Disable-ADSIComputer { <# .SYNOPSIS Function to disable a Computer Account .DESCRIPTION Function to disable a Computer Account .PARAMETER Identity Specifies the Identity of the Computer. You can provide one of the following properties DistinguishedName Guid Name Sam...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSISite.ps1
Get-ADSISite.ps1
function Get-ADSISite { <# .SYNOPSIS Function to retrieve the Active Directory Site(s) .DESCRIPTION Function to retrieve the Active Directory Site(s) .PARAMETER Credential Specifies alternative credential to use. Default is the current user. .PARAMETER ForestName Specifies the ForestName ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Remove-ADSIComputer.ps1
Remove-ADSIComputer.ps1
function Remove-ADSIComputer { <# .SYNOPSIS Function to Remove a Computer Account .DESCRIPTION Function to Remove a Computer Account .PARAMETER Identity Specifies the Identity of the Computer. You can provide one of the following: DistinguishedName Guid Name SamAccountName Sid .PARA...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIDomainController.ps1
Get-ADSIDomainController.ps1
function Get-ADSIDomainController { <# .SYNOPSIS Function to retrieve Domain Controllers .DESCRIPTION Function to retrieve Domain Controllers .PARAMETER Credential Specifies alternative credential .PARAMETER DomainName Specifies the Domain Name where the function should look .EXAMPLE...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIForestMode.ps1
Get-ADSIForestMode.ps1
Function Get-ADSIForestMode { [cmdletbinding()] PARAM ( [Alias("RunAs")] [System.Management.Automation.PSCredential] [System.Management.Automation.Credential()] $Credential = [System.Management.Automation.PSCredential]::Empty, $ForestName = [System.DirectoryServices.ActiveDirectory.Forest]::Getc...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIUser.ps1
Get-ADSIUser.ps1
function Get-ADSIUser { <# .SYNOPSIS Function to retrieve a User in Active Directory .DESCRIPTION Function to retrieve a User in Active Directory .PARAMETER Identity Specifies the Identity of the User You can provide one of the following properties DistinguishedName Guid Name SamAccountName ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIGlobalCatalog.ps1
Get-ADSIGlobalCatalog.ps1
function Get-ADSIGlobalCatalog { <# .SYNOPSIS Function to retrieve the Global Catalog in the Forest .DESCRIPTION Function to retrieve the Global Catalog in the Forest .PARAMETER Credential Specifies the alternative credential to use. Default is the current user. .PARAMETER ForestName Spec...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Unlock-ADSIUser.ps1
Unlock-ADSIUser.ps1
function Unlock-ADSIUser { <# .SYNOPSIS Function to Unlock a User in Active Directory .DESCRIPTION Function to Unlock a User in Active Directory .PARAMETER Identity Specifies the Identity .PARAMETER Credential Specifies alternative credential .EXAMPLE Unlock-ADSIUser -Identity 'te...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSIReplicaCurrentTime.ps1
Get-ADSIReplicaCurrentTime.ps1
function Get-ADSIReplicaCurrentTime { <# .SYNOPSIS Get-ADSIReplicaCurrentTime retrieves the current time of a given DC. .DESCRIPTION Get-ADSIReplicaCurrentTime retrieves the current time of a given DC. When using the verbose switch, this cmdlet will display the time difference with the cu...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Start-ADSIReplicationConsistencyCheck.ps1
Start-ADSIReplicationConsistencyCheck.ps1
function Start-ADSIReplicationConsistencyCheck { <# .SYNOPSIS Start-ADSIReplicationConsistencyCheck starts the knowledge consistency checker on a given DC. .DESCRIPTION Start-ADSIReplicationConsistencyCheck connects to an Active Directory Domain Controller and starts the KCC to verify if the ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Get-ADSISiteServer.ps1
Get-ADSISiteServer.ps1
function Get-ADSISiteServer { <# .SYNOPSIS Function to retrieve the Active Directory Site Servers .DESCRIPTION Function to retrieve the Active Directory Site Servers .PARAMETER Credential Specifies alternative credential to use. Default is the current user. .PARAMETER ForestName Specifies...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Disable-ADSIUser.ps1
Disable-ADSIUser.ps1
function Disable-ADSIUser { <# .SYNOPSIS Function to Disable a User Account .DESCRIPTION Function to Disable a User Account .PARAMETER Identity Specifies the Identity of the User. You can provide one of the following properties DistinguishedName Guid Name SamAccountName ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Move-ADSIGroup.ps1
Move-ADSIGroup.ps1
function Move-ADSIGroup { <# .SYNOPSIS Function to Move an Active Directory group in a different Organizational Unit (OU) .DESCRIPTION Function to Move an Active Directory group in a different Organizational Unit (OU) .PARAMETER Identity Specifies the Identity of the group You can provide ...
PowerShellCorpus/PowerShellGallery/AdsiPS/1.0.0.2/Public/Remove-ADSISiteSubnet.ps1
Remove-ADSISiteSubnet.ps1
function Remove-ADSISiteSubnet { <# .SYNOPSIS function to remove a Subnet .DESCRIPTION function to remove a Subnet .PARAMETER SubnetName Specifies the Subnet Name .PARAMETER Credential Specifies the alternative credential to use. By default it will use the current user windows credenti...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/FormatCommits.ps1
FormatCommits.ps1
Function FormatCommits { param( [Parameter(Mandatory=$true)] [psobject]$dtCommits ) $commits = @() $results = @() foreach ($c in $dtCommits) { $tempObj = new-object psobject Add-Member -InputObject $tempObj -MemberType NoteProperty -Name Week -Value (GetWe...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/DecryptString.ps1
DecryptString.ps1
# https://blogs.msdn.microsoft.com/besidethepoint/2010/09/21/decrypt-secure-strings-in-powershell/ function DecryptString { param( [Parameter(ValueFromPipeline=$true,Mandatory=$true,Position=0)] [System.Security.SecureString] $Token ) $marshal = [System.Runtime.InteropServices.Marshal] $ptr = $mar...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/ImportConfig.ps1
ImportConfig.ps1
Function ImportConfig { <# .Synopsis Check for configuration and output the information. .DESCRIPTION Check for configuration and output the information. Goes into the $env:appdata for the configuration file. .EXAMPLE ImportConfig #> if ( $IsWindows -or ( [version]$PSVersionTable.PSVersion -lt [ver...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/GetMethodParameters.ps1
GetMethodParameters.ps1
Function GetMethodParameters { [cmdletbinding()] param( $GetURLParameters ) $string = '?' foreach ($Param in $GetUrlParameters) { $Param.Keys | ForEach-Object { $key = $_ $value = $Param[$_] } $string += "&" $string += [uri]::EscapeDataString($key) $string += "=" ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/QueryGitLabAPI.ps1
QueryGitLabAPI.ps1
Function QueryGitLabAPI { [cmdletbinding()] param( [Parameter(Mandatory=$true, HelpMessage='A hash table used for splatting against invoke-restmethod.', Position=0)] [ValidateNotNullOrEmpty()] $Request, [Parameter(Mandatory=$false, HelpMessage='Pro...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/DownloadFromGitLabAPI.ps1
DownloadFromGitLabAPI.ps1
Function DownloadFromGitLabAPI { <# .SYNOPSIS Download file from GitLab API .DESCRIPTION Download file from GitLab API .PARAMETER RequestURI The URL for download. .PARAMETER OutFile Where to save the file. .EXAMPLE DownloadFromGitLabAPI -RequestURI /projects...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/GetWeek.ps1
GetWeek.ps1
function GetWeek([datetime]$DateTime = (Get-Date)) { $cultureInfo = [System.Globalization.CultureInfo]::CurrentCulture $cultureInfo.Calendar.GetWeekOfYear($DateTime,$cultureInfo.DateTimeFormat.CalendarWeekRule,$cultureInfo.DateTimeFormat.FirstDayOfWeek) }
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/GetVisibilityLevel.ps1
GetVisibilityLevel.ps1
function GetVisibilityLevel { param( [ValidateSet("Public", "Internal", "Private")] $String ) switch ($String) { 'Public' { 20; break; } 'Internal' { 10; break; } 'Private' { 0; break; } } }
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Private/GetGitLabStatusCode.ps1
GetGitLabStatusCode.ps1
Function GetGitLabStatusCode { param( [Parameter(Mandatory=$true)] [int]$StatusCode ) switch ($StatusCode) { '200' { $Text = 'OK - The GET, PUT or DELETE request was successful, the resource(s) itself is returned as JSON' } '201' { $Text = 'Created - The POST reques...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/MergeRequests/Remove-GitLabMergeRequest.ps1
Remove-GitLabMergeRequest.ps1
Function Remove-GitLabMergeRequest { [cmdletbinding(SupportsShouldProcess,ConfirmImpact='High')] param( [Alias('project_id')] [ValidateNotNullOrEmpty()] [Parameter(Mandatory,ValueFromPipelineByPropertyName)] [string]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(Mandatory,ValueFromP...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/MergeRequests/Close-GitLabMergeRequest.ps1
Close-GitLabMergeRequest.ps1
Function Close-GitLabMergeRequest { [cmdletbinding()] param( [Alias('project_id')] [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName,Mandatory)] [string]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/MergeRequests/Get-GitLabMergeRequest.ps1
Get-GitLabMergeRequest.ps1
Function Get-GitLabMergeRequest { [cmdletbinding(DefaultParameterSetName='MergeRequests')] [OutputType('GitLab.MergeRequest')] param ( [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName='Single',Mandatory)] [Parameter(ParameterSetName='MergeRequests',Mandatory)] [string]$ProjectId, [Pa...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/MergeRequests/Set-GitLabMergeRequest.ps1
Set-GitLabMergeRequest.ps1
Function Set-GitLabMergeRequest { [cmdletbinding()] param( [Alias('project_id')] [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName,Mandatory)] [string]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName,M...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/MergeRequests/New-GitLabMergeRequest.ps1
New-GitLabMergeRequest.ps1
Function New-GitLabMergeRequest { [cmdletbinding()] param( [ValidateNotNullOrEmpty()] [Parameter(Mandatory)] [string]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(Mandatory)] [string]$SourceBranch, [ValidateNotNullOrEmpty()] [Para...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Statistics/Get-GitLabCommitStats.ps1
Get-GitLabCommitStats.ps1
Function Get-GitLabCommitStats { [cmdletbinding()] [OutputType('GitLab.Commit')] param( [Parameter(ParameterSetName="Id",Mandatory=$true)] [Parameter(ParameterSetName="IdAuth",Mandatory=$true)] [Parameter(ParameterSetName="IdLastYear",Mandatory=$true)] [Parameter(ParameterSetName="IdBDate",Mandat...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/User/Remove-GitLabUser.ps1
Remove-GitLabUser.ps1
Function Remove-GitLabUser { [cmdletbinding(SupportsShouldProcess=$True,ConfirmImpact='High')] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string[]]$Username ) BEG...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/User/Search-GitLabUser.ps1
Search-GitLabUser.ps1
Function Search-GitLabUser { [cmdletbinding()] param( [Parameter(Mandatory=$true)] [string]$User ) $Request = @{ URI="/users?search=$($User)"; Method='Get'; } QueryGitLabAPI -Request $Request -ObjectType 'GitLab.User' }
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/User/Block-GitLabUser.ps1
Block-GitLabUser.ps1
Function Block-GitLabUser { [cmdletbinding(DefaultParameterSetName='ID')] param( [Parameter(Mandatory=$True, ParameterSetName='ID', ValueFromPipelineByPropertyName=$true)] [string]$ID, [Parameter(Mandatory=$True, ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/User/New-GitLabUser.ps1
New-GitLabUser.ps1
Function New-GitLabUser { [CmdletBinding()] param ( [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$true)] [string]$Email, [ValidateNotNullOrEmpty()] [ValidatePattern("(?# Error: Password Must Contain at least 8 characters).{8,}")] [Parameter(Mandatory=...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/User/Set-GitLabUser.ps1
Set-GitLabUser.ps1
Function Set-GitLabUser { [cmdletbinding()] param( [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$true,ParameterSetName='ID')] [string]$ID, [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$true,ParameterSetName='Email')] [string]$Email, [Val...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/User/Get-GitLabUser.ps1
Get-GitLabUser.ps1
Function Get-GitLabUser { [cmdletbinding(DefaultParameterSetName='All')] [OutputType('GitLab.User')] param( [Parameter(ParameterSetName='ID')] [string]$ID, [Parameter(ParameterSetName='All')] [switch]$All, [Parameter(ParameterSetName='Username')] ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/User/Unblock-GitLabUser.ps1
Unblock-GitLabUser.ps1
Function Unblock-GitLabUser { [cmdletbinding(DefaultParameterSetName='ID')] param( [Parameter(Mandatory=$True, ParameterSetName='ID', ValueFromPipelineByPropertyName=$true)] [string]$ID, [Parameter(Mandatory=$True, ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Set-GitLabProjectWebhook.ps1
Set-GitLabProjectWebhook.ps1
Function Set-GitLabProjectWebhook { [OutputType('GitLab.Project.Webhook')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(ParameterSetName=...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Set-GitLabProject.ps1
Set-GitLabProject.ps1
Function Set-GitLabProject { [cmdletbinding()] param( [ValidateNotNullOrEmpty()] [Parameter( Mandatory=$true, ParameterSetName='ID', ValueFromPipelineByPropertyName=$true )] [string[]]$ID, [string]$Name = $null, ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Set-GitLabProjectServiceSlack.ps1
Set-GitLabProjectServiceSlack.ps1
Function Set-GitLabProjectServiceSlack { [OutputType('GitLab.Project.Service.Slack')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(Paramete...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/New-GitLabFork.ps1
New-GitLabFork.ps1
Function New-GitLabFork { [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName='Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(ParameterSetName='Namespace')] ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Remove-GitLabProject.ps1
Remove-GitLabProject.ps1
Function Remove-GitLabProject { [cmdletbinding(SupportsShouldProcess=$True,ConfirmImpact='High')] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [string]$Id ) BEGIN {} PROCESS { $Requ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Get-GitLabProjectEvent.ps1
Get-GitLabProjectEvent.ps1
Function Get-GitLabProjectEvent { [cmdletbinding()] [OutputType('GitLab.Project.Event')] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName='Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName='Namespace')] ...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Remove-GitLabProjectServiceSlack.ps1
Remove-GitLabProjectServiceSlack.ps1
Function Remove-GitLabProjectServiceSlack { [OutputType('GitLab.Project.Service.Slack')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(Param...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Get-GitLabProject.ps1
Get-GitLabProject.ps1
Function Get-GitLabProject { [cmdletbinding(DefaultParameterSetName='Projects')] [OutputType("GitLab.Project")] param( [Parameter(ParameterSetName='Single', Mandatory=$true)] [int]$Id, [Parameter(Mandatory=$false, ParameterSetName='Pr...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Remove-GitLabProjectWebhook.ps1
Remove-GitLabProjectWebhook.ps1
Function Remove-GitLabProjectWebhook { [OutputType('GitLab.Project.Webhook')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(ParameterSetNa...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/New-GitLabProjectWebhook.ps1
New-GitLabProjectWebhook.ps1
Function New-GitLabProjectWebhook { [OutputType('GitLab.Project.Webhook')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(ParameterSetN...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Get-GitLabProjectWebhook.ps1
Get-GitLabProjectWebhook.ps1
Function Get-GitLabProjectWebhook { [OutputType('GitLab.Project.Webhook')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(ParameterSetNam...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Get-GitLabProjectServiceSlack.ps1
Get-GitLabProjectServiceSlack.ps1
Function Get-GitLabProjectServiceSlack { [OutputType('GitLab.Project.Service.Slack')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(Paramete...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Get-GitLabProjectCommit.ps1
Get-GitLabProjectCommit.ps1
Function Get-GitLabProjectCommit { [OutputType('GitLab.Project.Commit')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(ParameterSetName='Nam...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/New-GitLabProject.ps1
New-GitLabProject.ps1
Function New-GitLabProject { [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(Mandatory=$true)] [string]$name, [string]$path, [string]$namespace, [string]$description, [switch]$issues_enabled, [s...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Projects/Get-GitLabProjectTag.ps1
Get-GitLabProjectTag.ps1
Function Get-GitLabProjectTag { [OutputType('GitLab.Project.Tag')] [cmdletbinding()] param( [ValidateNotNull()] [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName = 'Id')] [string]$Id, [ValidateNotNull()] [ValidateNotNullOrEmpty()] #[Parameter(ParameterSetName='Namespace...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Build/New-GitLabBuild.ps1
New-GitLabBuild.ps1
Function New-GitLabBuild { [cmdletbinding()] param( [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName="Default",Mandatory=$true)] [Parameter(ParameterSetName="Variable",Mandatory=$true)] [int]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName="Default",Mandatory=$tru...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Configuration/Test-GitLabAPI.ps1
Test-GitLabAPI.ps1
Function Test-GitLabAPI { $GitLabConfig = ImportConfig $Domain = $GitLabConfig.Domain $Token = DecryptString -Token $GitLabConfig.Token $Result = Invoke-WebRequest -UseBasicParsing -Uri "$Domain/api/v3/projects?private_token=$Token" Remove-Variable Token GetGitLabStatusCode $Result.S...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Configuration/Save-GitLabAPIConfiguration.ps1
Save-GitLabAPIConfiguration.ps1
Function Save-GitLabAPIConfiguration { [cmdletbinding()] param( [Parameter(Mandatory=$true, HelpMessage='You can find the token in your profile.', Position=0)] [ValidateNotNullOrEmpty()] $Token, [Parameter(Mandatory=$true, HelpMessage='Please provi...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Milestones/Set-GitLabMilestone.ps1
Set-GitLabMilestone.ps1
Function Set-GitLabMilestone { [cmdletbinding()] param( [Alias('project_id')] [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName,Mandatory)] [string]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName,Mand...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Milestones/New-GitLabMilestone.ps1
New-GitLabMilestone.ps1
Function New-GitLabMilestone { [cmdletbinding()] param( [ValidateNotNullOrEmpty()] [Parameter(Mandatory)] [string]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(Mandatory)] [string]$Title, [string]$Description, [datetime]...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Milestones/Get-GitLabMilestone.ps1
Get-GitLabMilestone.ps1
Function Get-GitLabMilestone { [cmdletbinding(DefaultParameterSetName='MergeRequests')] [OutputType('GitLab.Milestone')] param ( [ValidateNotNullOrEmpty()] [Parameter(ParameterSetName='Single',Mandatory)] [Parameter(ParameterSetName='MergeRequests',Mandatory)] [string]$ProjectId, [Paramete...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Milestones/Close-GitLabMilestone.ps1
Close-GitLabMilestone.ps1
Function Close-GitLabMilestone { [cmdletbinding()] param( [Alias('project_id')] [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName,Mandatory)] [string]$ProjectId, [ValidateNotNullOrEmpty()] [Parameter(ValueFromPipelineByPropertyName,Ma...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Namespaces/Get-GitLabNamespace.ps1
Get-GitLabNamespace.ps1
Function Get-GitLabNamespace { [cmdletbinding()] [OutputType('GitLab.Namespace')] param ( [string]$search ) $GetUrlParameters = @() if ($search -ne $null) { $GetUrlParameters += @{search=$search} } $GetUrlParameters += @{per_page=100} $URLParameters = GetMethodParameters -Ge...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Keys/Push-SSHKeysToGitLab.ps1
Push-SSHKeysToGitLab.ps1
Function Push-SSHKeysToGitLab { [cmdletbinding(SupportsShouldProcess=$true,ConfirmImpact='High')] param( [ValidateScript({ Test-Path $_ })] $SSHDirectory = "~/.ssh/" ) $PublicKeyFiles = Get-Childitem -Recurse -Path $SSHDirectory -Include "*.pub" if ($PublicKeyFiles.count -...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Keys/New-GitLabUserKey.ps1
New-GitLabUserKey.ps1
Function New-GitLabUserKey { [cmdletbinding(DefaultParameterSetName='Explicit')] [OutputType('GitLab.User.Key')] param( [Parameter(ParameterSetName='Explicit')] [string]$Title, [Parameter(ParameterSetName='Explicit',Mandatory=$true)] [string]$Key, [Paramet...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Keys/Remove-GitLabUserKey.ps1
Remove-GitLabUserKey.ps1
Function Remove-GitLabUserKey { [cmdletbinding(SupportsShouldProcess=$true)] [OutputType('GitLab.User.Key')] param( [Parameter(ParameterSetName='Id',Mandatory=$true)] [Parameter(ParameterSetName='User',Mandatory=$true)] [string]$Id, [Parameter(ParameterSetName='User'...
PowerShellCorpus/PowerShellGallery/PSGitLab/2.5.3/Public/Keys/Get-GitLabUserKey.ps1
Get-GitLabUserKey.ps1
Function Get-GitLabUserKey { [cmdletbinding(DefaultParameterSetName='All')] [OutputType('GitLab.User.Key')] param( [Parameter(ParameterSetName='All')] [switch]$All, [Parameter(ParameterSetName='Key')] [int]$Key, [Parameter(ParameterSetName='Username'...
PowerShellCorpus/PowerShellGallery/xDSCUtils/0.1/Tests/xDscUtils.ps1
xDscUtils.ps1
Import-Module ..\xDscUtils.psm1 -Force function xDscUtils { }
PowerShellCorpus/PowerShellGallery/xDSCUtils/0.1/Tests/xDscUtils.Tests.ps1
xDscUtils.Tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -replace '\.Tests\.', '.' . "$here\$sut" Describe "New-xSelfSignedDscEncryptionCertificate tests" { $global:cert = $null BeforeEach { $global:cert = $null } AfterEach { ...
PowerShellCorpus/PowerShellGallery/MegaCoolServiceScritps/1.0.13/MegaCoolServiceScritps.tests.ps1
MegaCoolServiceScritps.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 "DeployTemplate" { Context "Function Exists" { It "Should Return" { } } }
PowerShellCorpus/PowerShellGallery/psprtg/0.0.3/PSPRTG.tests.ps1
PSPRTG.tests.ps1
$here = Split-Path -Parent $MyInvocation.MyCommand.Path $DefaultsFile = "$here\PSPRTG.Pester.Defaults.json" # Load defaults from file (merging into $global:LeanKitPesterTestDefaults if(Test-Path $DefaultsFile){ $defaults = if($global:PRTGPesterDefaults){$global:PRTGPesterDefaults}else{@{}}; (Get-Content ...
PowerShellCorpus/PowerShellGallery/psprtg/0.0.3/MAKE.ps1
MAKE.ps1
function ZipFiles { param( $zipfilename, $sourcedir ) Add-Type -Assembly System.IO.Compression.FileSystem $compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal [System.IO.Compression.ZipFile]::CreateFromDirectory($sourcedir, $zipfilename, $compressionLevel, $true) } f...
PowerShellCorpus/PowerShellGallery/ProtectedData/4.1.3/PinnedArray.ps1
PinnedArray.ps1
Add-Type -TypeDefinition @' namespace PowerShellUtils { using System; using System.Runtime.InteropServices; public sealed class PinnedArray<T> : IDisposable { private readonly T[] array; private readonly GCHandle gcHandle; public rea...
PowerShellCorpus/PowerShellGallery/ProtectedData/4.1.3/Commands.ps1
Commands.ps1
if ($PSVersionTable.PSVersion.Major -eq 2) { $IgnoreError = 'SilentlyContinue' } else { $IgnoreError = 'Ignore' } $script:ValidTypes = @( [string] [System.Security.SecureString] [System.Management.Automation.PSCredential] [byte[]] ) $script:PSCredentialHeader = [byte[]](5,12,19...
PowerShellCorpus/PowerShellGallery/ProtectedData/4.1.3/HMAC.ps1
HMAC.ps1
Add-Type -ReferencedAssemblies System.Core -WarningAction SilentlyContinue -TypeDefinition @' namespace PowerShellUtils { using System; using System.Reflection; using System.Security.Cryptography; public class FipsHmacSha256 : HMAC { // Class exists ...