full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Request-RedditOAuthTokenCode.ps1
Request-RedditOAuthTokenCode.ps1
<# .NOTES Created with: VSCode Created on: 5/05/2017 02:27 PM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthTokenCode.ps1 .DESCRIPTION Request-RedditOAuthTokenCode Function #> [CmdletBinding()] param() f...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Request-RedditOAuthTokenImplicit.ps1
Request-RedditOAuthTokenImplicit.ps1
<# .NOTES Created with: VSCode Created on: 5/06/2017 02:27 PM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthTokenImplicit.ps1 .DESCRIPTION Request-RedditOAuthTokenImplicit Function #> [CmdletBinding()] pa...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Get-AuthorizationHeader.ps1
Get-AuthorizationHeader.ps1
<# .NOTES Created with: VSCode Created on: 5/05/2017 03:27 PM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Get-AuthorizationHeader.ps1 .DESCRIPTION Get-AuthorizationHeader Function #> [CmdletBinding()] param() function Ge...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Request-RedditOAuthTokenClient.ps1
Request-RedditOAuthTokenClient.ps1
<# .NOTES Created with: VSCode Created on: 5/05/2017 02:27 PM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthTokenClient.ps1 .DESCRIPTION Request-RedditOAuthTokenClient Function #> [CmdletBinding()] param(...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Request-RedditOAuthTokenInstalled.ps1
Request-RedditOAuthTokenInstalled.ps1
<# .NOTES Created with: VSCode Created on: 5/05/2017 11:27 AM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthTokenInstalled.ps1 .DESCRIPTION Request-RedditOAuthTokenInstalled Function #> [CmdletBinding()] ...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Show-RedditOAuthWindow.ps1
Show-RedditOAuthWindow.ps1
<# .NOTES Created with: VSCode Created on: 5/03/2017 04:16 AM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Show-RedditOAuthWindow.ps1 .DESCRIPTION Show-RedditOAuthWindow Function #> [CmdletBinding()] param() function Show...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Request-RedditOAuthCode.ps1
Request-RedditOAuthCode.ps1
<# .NOTES Created with: VSCode Created on: 5/01/2017 11:38 AM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthCode.ps1 .DESCRIPTION Request-RedditOAuthCode Function #> [CmdletBinding()] param() function Re...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Request-RedditOAuthTokenRefresh.ps1
Request-RedditOAuthTokenRefresh.ps1
<# .NOTES Created with: VSCode Created on: 5/17/2017 03:58 PM Edited on: 5/18/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthTokenRefresh.ps1 .DESCRIPTION Request-RedditOAuthTokenRefresh Function #> [CmdletBinding()] para...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/OAuth/Request-RedditOAuthTokenPassword.ps1
Request-RedditOAuthTokenPassword.ps1
<# .NOTES Created with: VSCode Created on: 5/05/2017 02:27 PM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthTokenPassword.ps1 .DESCRIPTION Request-RedditOAuthTokenPassword Function #> [CmdletBinding()] pa...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Private/API/Wait-RedditApiRateLimit.ps1
Wait-RedditApiRateLimit.ps1
<# .NOTES Created with: Plaster Created on: 5/20/2017 6:18 AM Edited on: 5/20/2017 Created by: Mark Kraus Organization: Filename: Wait-RedditApiRateLimit.ps1 .DESCRIPTION Wait-RedditApiRateLimit Function #> [CmdletBinding()] param() function W...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/Application/Export-RedditApplication.ps1
Export-RedditApplication.ps1
<# .NOTES Created with: VSCode Created on: 4/30/2017 1:09 PM Edited on: 5/11/2017 Created by: Mark Kraus Organization: Filename: Export-RedditApplication.ps1 .DESCRIPTION Export-RedditApplication Function #> [CmdletBinding()] param() function E...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/Application/New-RedditApplication.ps1
New-RedditApplication.ps1
<# .NOTES Created with: VSCode Created on: 4/26/2017 04:40 AM Edited on: 5/14/2017 Created by: Mark Kraus Organization: Filename: New-RedditApplication.ps1 .DESCRIPTION New-RedditApplication Function #> [CmdletBinding()] param() function New-Re...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/Application/Import-RedditApplication.ps1
Import-RedditApplication.ps1
<# .NOTES Created with: VSCode Created on: 5/01/2017 4:39 AM Edited on: 5/11/2017 Created by: Mark Kraus Organization: Filename: Import-RedditApplication.ps1 .DESCRIPTION Import-RedditApplication Function #> [CmdletBinding()] param() function I...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/OAuth/Export-RedditOAuthToken.ps1
Export-RedditOAuthToken.ps1
<# .NOTES Created with: VSCode Created on: 5/11/2017 3:47 AM Edited on: 5/11/2017 Created by: Mark Kraus Organization: Filename: Export-RedditOAuthToken.ps1 .DESCRIPTION Export-RedditOAuthToken Function #> [CmdletBinding()] param() function Exp...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/OAuth/Get-RedditOAuthScope.ps1
Get-RedditOAuthScope.ps1
<# .NOTES Created with: VSCode Created on: 4/23/2017 1:42 PM Edited on: 5/13/2017 Created by: Mark Kraus Organization: Filename: Get-RedditOAuthScope.ps1 .DESCRIPTION Get-RedditOAuthScope Function #> [CmdletBinding()] param() function Get-Reddit...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/OAuth/Request-RedditOAuthToken.ps1
Request-RedditOAuthToken.ps1
<# .NOTES Created with: VSCode Created on: 5/01/2017 11:38 AM Edited on: 5/13/2017 Created by: Mark Kraus Organization: Filename: Request-RedditOAuthToken.ps1 .DESCRIPTION Request-RedditOAuthToken Function #> [CmdletBinding()] param() function R...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/OAuth/Update-RedditOAuthToken.ps1
Update-RedditOAuthToken.ps1
<# .NOTES Created with: VSCode Created on: 5/17/2017 04:07 AM Edited on: 5/18/2017 Created by: Mark Kraus Organization: Filename: Update-RedditOAuthToken.ps1 .DESCRIPTION Update-RedditOAuthToken Function #> [CmdletBinding()] param() function Upd...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/OAuth/Import-RedditOAuthToken.ps1
Import-RedditOAuthToken.ps1
<# .NOTES Created with: VSCode Created on: 5/11/2017 4:39 AM Edited on: 5/11/2017 Created by: Mark Kraus Organization: Filename: Import-RedditOAuthToken.ps1 .DESCRIPTION Import-RedditOAuthToken Function #> [CmdletBinding()] param() function Imp...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Public/API/Invoke-RedditRequest.ps1
Invoke-RedditRequest.ps1
<# .NOTES Created with: Plaster Created on: 5/20/2017 8:32 AM Edited on: 5/20/2017 Created by: Mark Kraus Organization: Filename: Invoke-RedditRequest.ps1 .DESCRIPTION Invoke-RedditRequest Function #> [CmdletBinding()] param() function Invoke-...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Enums/RedditOAuthGrantType.ps1
RedditOAuthGrantType.ps1
<# .NOTES Created with: VSCode Created on: 5/05/2017 02:00 PM Edited on: 5/05/2017 Created by: Mark Kraus Organization: Filename: RedditOAuthGrantType.psm1 .DESCRIPTION RedditOAuthGrantType Enum #> Enum RedditOAuthGrantType { Authorization_C...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Enums/RedditOAuthResponseType.ps1
RedditOAuthResponseType.ps1
<# .NOTES Created with: VSCode Created on: 5/01/2017 12:27 PM Edited on: 5/01/2017 Created by: Mark Kraus Organization: Filename: RedditOAuthResponseType.psm1 .DESCRIPTION RedditOAuthResponseType Enum #> Enum RedditOAuthResponseType { Code ...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Enums/RedditApplicationType.ps1
RedditApplicationType.ps1
Enum RedditApplicationType { WebApp Script Installed }
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Enums/RedditOAuthDuration.ps1
RedditOAuthDuration.ps1
<# .NOTES Created with: VSCode Created on: 5/01/2017 12:27 PM Edited on: 5/01/2017 Created by: Mark Kraus Organization: Filename: RedditOAuthDuration.psm1 .DESCRIPTION RedditOAuthDuration Enum #> Enum RedditOAuthDuration { Permanent Temp...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Classes/002-RedditApplication.ps1
002-RedditApplication.ps1
<# .NOTES Created with: VSCode Created on: 4/26/2017 3:37 PM Edited on: 5/10/2017 Created by: Mark Kraus Organization: Filename: 002-RedditApplication.ps1 .DESCRIPTION RedditApplication Class #> Class RedditApplication { [String]$Name [...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Classes/001-RedditOAuthScope.ps1
001-RedditOAuthScope.ps1
<# .NOTES Created with: VSCode Created on: 4/24/2017 3:37 PM Edited on: 5/10/2017 Created by: Mark Kraus Organization: Filename: 001-RedditOAuthScope.ps1 .DESCRIPTION RedditOAuthScope Class #> Class RedditOAuthScope { [String]$Scope [Str...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Classes/003-RedditOAuthCode.ps1
003-RedditOAuthCode.ps1
<# .NOTES Created with: VSCode Created on: 5/01/2017 12:00 PM Edited on: 5/10/2017 Created by: Mark Kraus Organization: Filename: 003-RedditOAuthCode.psm1 .DESCRIPTION RedditOAuthCode Class #> Class RedditOAuthCode { [RedditApplication]$App...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Classes/005-RedditApiResponse.ps1
005-RedditApiResponse.ps1
<# .NOTES Created with: Plaster Created on: 5/20/2017 10:01 AM Edited on: 5/20/2017 Created by: Mark Kraus Organization: Filename: 005-RedditApiResponse.ps1 .DESCRIPTION RedditApiResponse Class #> Class RedditApiResponse { [RedditOAuthToken...
PowerShellCorpus/PowerShellGallery/PSRAW/1.1.0.7/Classes/004-RedditOAuthToken.ps1
004-RedditOAuthToken.ps1
<# .NOTES Created with: VSCode Created on: 5/05/2017 02:48 PM Edited on: 5/15/2017 Created by: Mark Kraus Organization: Filename: 004-RedditOAuthToken.ps1 .DESCRIPTION RedditOAuthToken Class #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute(...
PowerShellCorpus/PowerShellGallery/InvokeDSC/1.1.0/Public/Invoke-DscConfigurationByRoles.ps1
Invoke-DscConfigurationByRoles.ps1
function Invoke-DscConfigurationByRoles { <# .SYNOPSIS Invokes Dsc configurations by matching role names. .DESCRIPTION Scans a specified directory recursivly to locate matching .json configuration documents. Each .json configuration document is then converted to a PowerShell object and invoked. .PARA...
PowerShellCorpus/PowerShellGallery/InvokeDSC/1.1.0/Public/Invoke-Dsc.ps1
Invoke-Dsc.ps1
function Invoke-Dsc { <# .SYNOPSIS Invokes Dsc resources .DESCRIPTION Passes PSCustomObjects to Invoke-DscResource first by invoking the test method and if the test method fails invokes the set method. .PARAMETER Resource Specifies the PSCustomObject to be passed to Invoke-DscResource .EXAMPLE $r = Con...
PowerShellCorpus/PowerShellGallery/InvokeDSC/1.1.0/Public/Get-ModuleFromConfiguration.ps1
Get-ModuleFromConfiguration.ps1
function Get-ModuleFromConfiguration { <# .SYNOPSIS Gathers module names from a specified json configuration file. .DESCRIPTION Parses a json configuration file and extracts the module names. Duplicate module names will be removed outputting only unqiue module names. .PARAMETER Path Specifies th...
PowerShellCorpus/PowerShellGallery/InvokeDSC/1.1.0/Public/Invoke-DscConfiguration.ps1
Invoke-DscConfiguration.ps1
function Invoke-DscConfiguration { <# .SYNOPSIS Invokes a specified configuration file with Desired State Configuration .DESCRIPTION Prases the specified configuration file and extracts out unique Dsc resource modules required and attempts to download them. Once the modules are obtained it converts ...
PowerShellCorpus/PowerShellGallery/InvokeDSC/1.1.0/Public/ConvertTo-DSC.ps1
ConvertTo-DSC.ps1
function ConvertTo-Dsc { <# .SYNOPSIS Converts json DSL files to PSCustomObject .DESCRIPTION Converts json DSL files to PSCustomObjects that Invoke-DSCResource can consume. All property objects will be converted to hashtables for the property cmdlet of Invoke-DSCResource. ModuleName is discovered...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Examples/SecurityTemplate_Example.ps1
SecurityTemplate_Example.ps1
Configuration CompareInfs { Import-DscResource -ModuleName SecurityPolicyDsc node localhost { SecurityTemplate TrustedCredentialAccess { Path = "C:\scratch\SecurityPolicyBackup.inf" IsSingleInstance = 'Yes' } } } CompareInfs -OutputPath C:\...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Examples/Remove_All_Identities_From_Policy_USR.ps1
Remove_All_Identities_From_Policy_USR.ps1
Configuration UserRights { Import-DscResource -ModuleName SecurityPolicyDsc Node localhost { UserRightsAssignment RemoveIdsFromSeTrustedCredManAccessPrivilege { # When Identity is an empty string all identities will be removed from the policy Policy = "Acces...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Examples/Basic_USR_Example.ps1
Basic_USR_Example.ps1
Configuration UserRights { Import-DscResource -ModuleName SecurityPolicyDsc Node localhost { #Assign shutdown privileges to only Builtin\Administrators UserRightsAssignment AssignShutdownPrivilegesToAdmins { Policy = "Shut_down_the_system" ...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Unit/SecurityPolicyResourceHelper.tests.ps1
SecurityPolicyResourceHelper.tests.ps1
#region HEADER # Unit Test Template Version: 1.2.0 $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or ` (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCRes...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Unit/MSFT_UserRightsAssignment.tests.ps1
MSFT_UserRightsAssignment.tests.ps1
$script:dscModuleName = 'SecurityPolicyDsc' $script:dscResourceName = 'MSFT_UserRightsAssignment' #region HEADER $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or ` (-not (Te...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Unit/MSFT_SecurityTemplate.tests.ps1
MSFT_SecurityTemplate.tests.ps1
#region HEADER $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or ` (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests\TestHelper.psm1'))) ) { ...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Unit/MSFT_SecuritySetting.tests.ps1
MSFT_SecuritySetting.tests.ps1
$script:dscModuleName = 'SecurityPolicyDsc' $script:dscResourceName = 'MSFT_SecuritySetting' #region HEADER $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or ` (-not (Test-Pa...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Integration/MSFT_SecurityTemplate.Integration.tests.ps1
MSFT_SecurityTemplate.Integration.tests.ps1
$script:DSCModuleName = 'SecurityPolicyDsc' $script:DSCResourceName = 'MSFT_SecurityTemplate' #region HEADER # Integration Test Template Version: 1.1.1 $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Integration/MSFT_SecurityTemplate.config.ps1
MSFT_SecurityTemplate.config.ps1
# create test user and security template $userName = "TestUser" + ([guid]::NewGuid().guid).substring(0,6) $policy = 'SeTrustedCredManAccessPrivilege' $directoryEntry = [ADSI]"WinNT://$env:COMPUTERNAME,Computer" $user = $directoryEntry.Create("User", $userName) $user.setpassword('P@ssword1') $user.SetInfo() $...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Integration/MSFT_UserRightsAssignment.config.ps1
MSFT_UserRightsAssignment.config.ps1
$rule = @{ Policy = 'Access_Credential_Manager_as_a_trusted_caller' Identity = 'builtin\Administrators' } $removeAll = @{ Policy = 'Act_as_part_of_the_operating_system' Identity = "" } configuration MSFT_UserRightsAssignment_config { Import-DscResource -ModuleName SecurityPo...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Integration/MSFT_SecuritySetting.Integration.tests.ps1
MSFT_SecuritySetting.Integration.tests.ps1
$script:DSCModuleName = 'SecurityPolicyDsc' $script:DSCResourceName = 'MSFT_SecuritySetting' #region HEADER $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or ` (-not (Test...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Integration/MSFT_UserRightsAssignment.Integration.tests.ps1
MSFT_UserRightsAssignment.Integration.tests.ps1
$script:DSCModuleName = 'SecurityPolicyDsc' $script:DSCResourceName = 'MSFT_UserRightsAssignment' #region HEADER $script:moduleRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot) if ( (-not (Test-Path -Path (Join-Path -Path $script:moduleRoot -ChildPath 'DSCResource.Tests'))) -or ` (-not ...
PowerShellCorpus/PowerShellGallery/SecurityPolicyDsc/1.3.0.0/Tests/Integration/MSFT_SecuritySetting.config.ps1
MSFT_SecuritySetting.config.ps1
$rule = @{ LockoutBadCount = 10 Name = 'LockoutBadCount' } configuration MSFT_SecuritySetting_config { Import-DscResource -ModuleName SecurityPolicyDsc SecuritySetting LockoutBadCount { # Assign shutdown privileges to only Builtin\Administrators Name = "Locko...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Private/Invoke-GistApi.ps1
Invoke-GistApi.ps1
Function Invoke-GistApi { [CmdletBinding()] Param ( [Parameter( Mandatory = $false )] [HashTable] $Headers = @{ }, [Parameter( Mandatory = $true )] [String] $Method, [Parameter( Mandatory...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Private/PSGist.Classes.ps1
PSGist.Classes.ps1
Class Gist { [Int]$Comments [Uri]$CommentsUrl [Uri]$CommitsUrl [DateTime]$CreatedAt [string]$Description [GistFile[]]$Files [GistFork[]]$Forks [Uri]$ForksUrl [GistHistory[]]$History [Uri]$HtmlUrl [String]$Id [GistUser]$Owner [Bool]$Public [Uri]$PullUrl [Uri]$P...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Add-GistComment.ps1
Add-GistComment.ps1
Function Add-GistComment { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Add-GistComment.html" )] [OutputType( [GistComment] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipelin...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Save-Gist.ps1
Save-Gist.ps1
Function Save-Gist { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Save-Gist.html" )] [OutputType( [IO.FileInfo] )] Param ( [Parameter( HelpMessage = "Path to save the Gist Object." )] [String] $Path = "$env:APPDATA\PSGist", ...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Get-Gist.ps1
Get-Gist.ps1
Function Get-Gist { [CmdletBinding( DefaultParameterSetName = "__AllParameterSets", HelpUri = "http://dotps1.github.io/PSGist/Get-Gist.html" )] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "The username of the GitHub User.", Parame...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Copy-Gist.ps1
Copy-Gist.ps1
Function Copy-Gist { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Copy-Gist.html" )] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipeline = $true, ...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Get-GistVersion.ps1
Get-GistVersion.ps1
Function Get-GistVersion { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Get-GistVersion.html" )] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipelineByPro...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Get-GistComment.ps1
Get-GistComment.ps1
Function Get-GistComment { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Get-GistComment.html" )] [OutputType([GistComment])] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipeline = $true,...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Get-GistCommit.ps1
Get-GistCommit.ps1
Function Get-GistCommit { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Get-GistCommit.html" )] [OutputType( [GistHistory] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipeline ...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Remove-GistFile.ps1
Remove-GistFile.ps1
function Remove-GistFile { [CmdletBinding( ConfirmImpact = "High", HelpUri = "http://dotps1.github.io/PSGist/Remove-GistFile.html", SupportsShouldProcess = $true )] [OutputType( [Void] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Objec...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/New-Gist.ps1
New-Gist.ps1
Function New-Gist { [CmdletBinding( ConfirmImpact = "Low", HelpUri = "http://dotps1.github.io/PSGist/New-Gist.html", SupportsShouldProcess = $true )] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "Path to file(s) where the content will ...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Find-Gist.ps1
Find-Gist.ps1
Function Find-Gist { [CmdletBinding()] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "The username of the GitHub User." )] [String] $Owner = ((Import-Clixml -Path $env:AppData\PSGist\Private\OAuthToken.xml -ErrorAction Stop).GetNetworkCred...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/New-GistOAuthToken.ps1
New-GistOAuthToken.ps1
Function New-GistOAuthToken { [CmdletBinding( ConfirmImpact = "Low", HelpUri = "http://dotps1.github.io/PSGist/New-GistOAuthToken.html", SupportsShouldProcess = $true )] [OutputType( [String] )] Param ( [Parameter( HelpMessage = "PSCredential obje...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Remove-Gist.ps1
Remove-Gist.ps1
function Remove-Gist { [CmdletBinding( ConfirmImpact = "High", HelpUri = "http://dotps1.github.io/PSGist/Remove-Gist.html", SupportsShouldProcess = $true )] [OutputType( [Void] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", ...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Get-GistFork.ps1
Get-GistFork.ps1
Function Get-GistFork { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Get-GistFork.html" )] [OutputType( [GistFork] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipeline = $tru...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Update-GistFile.ps1
Update-GistFile.ps1
Function Update-GistFile { [CmdletBinding( ConfirmImpact = "Medium", HelpUri = "http://dotps1.github.io/PSGist/Update-GistFile.html", SupportsShouldProcess = $true )] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Ob...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Add-GistFile.ps1
Add-GistFile.ps1
Function Add-GistFile { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Add-GistFile.html" )] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipelineByPropertyNa...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Rename-GistFile.ps1
Rename-GistFile.ps1
Function Rename-GistFile { [CmdletBinding( HelpUri = "http://dotps1.github.io/PSGist/Rename-GistFile.html" )] [OutputType( [Gist] )] Param ( [Parameter( HelpMessage = "The Id of the Gist Object.", Mandatory = $true, ValueFromPipelineBy...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Set-Gist.ps1
Set-Gist.ps1
Function Set-Gist { [CmdletBinding( ConfirmImpact = "Low", HelpUri = "http://dotps1.github.io/PSGist/Set-Gist.html", SupportsShouldProcess = $true )] [OutputType( [Gist], [Void] )] Param ( [Parameter( HelpMessage = "The Id of the Gist ...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Remove-GistComment.ps1
Remove-GistComment.ps1
Function Remove-GistComment { [CmdletBinding( ConfirmImpact = "High", HelpUri = "http://dotps1.github.io/PSGist/Remove-GistComment.html", SupportsShouldProcess = $true )] [OutputType( [Void] )] Param ( [Parameter( HelpMessage = "The Id of the Gist...
PowerShellCorpus/PowerShellGallery/PSGist/2.2.0/Public/Update-GistComment.ps1
Update-GistComment.ps1
Function Update-GistComment { [CmdletBinding( ConfirmImpact = "Medium", HelpUri = "http://dotps1.github.io/PSGist/Update-GistComment.html", SupportsShouldProcess = $true )] [OutputType( [GistComment] )] Param ( [Parameter( HelpMessage = "The Id of...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Stop-ScriptLogger.ps1
Stop-ScriptLogger.ps1
<# .SYNOPSIS Stop the script logger inside the current PowerShell session. .DESCRIPTION Stop the script logger inside the current PowerShell session and clear all log configurations. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> Stop-ScriptLogger Stop the current logg...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Get-ScriptLogger.ps1
Get-ScriptLogger.ps1
<# .SYNOPSIS Get the current script logger. .DESCRIPTION Returns an object with the current configuration of the script logger inside this PowerShell session. .INPUTS None. .OUTPUTS ScriptLogger.Configuration. Configuration of the script logger instance. .EXAMPLE PS C:\> ...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Write-WarningLog.ps1
Write-WarningLog.ps1
<# .SYNOPSIS Log a warning message. .DESCRIPTION Log a warning message to the log file, the event log and show it on the current console. If the global log level is set to 'error', no warning message will be logged. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> Write-...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Write-ErrorLog.ps1
Write-ErrorLog.ps1
<# .SYNOPSIS Log an error message. .DESCRIPTION Log an error message to the log file, the event log and show it on the current console. It can also use an error record conataining an exception as input. The exception will be converted into a log message. .INPUTS None. .OUTPUTS ...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Start-ScriptLogger.ps1
Start-ScriptLogger.ps1
<# .SYNOPSIS Start the script logger inside the current PowerShell session. .DESCRIPTION Start the script logger inside the current PowerShell session. By starting the logger, a global log configuration for the current PowerShell session will be set. This configuration is customizable with the ...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Write-InformationLog.ps1
Write-InformationLog.ps1
<# .SYNOPSIS Log an information message. .DESCRIPTION Log an information message to the log file, the event log and show it on the current console. If the global log level is set to 'warning', no information message will be logged. .INPUTS None. .OUTPUTS None. .EXAMPLE ...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Set-ScriptLogger.ps1
Set-ScriptLogger.ps1
<# .SYNOPSIS Update the script logger log configuration. .DESCRIPTION The script logger inside the current PowerShell session can be updated with all parameters inside this cmdlet. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> Set-ScriptLogger -Level 'Warning' -EventLog $...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Functions/Write-VerboseLog.ps1
Write-VerboseLog.ps1
<# .SYNOPSIS Log a verbose message. .DESCRIPTION Log a verbose message to the log file, the event log and show it on the current console. If the global log level is set to 'information', no verbose message will be logged. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> ...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Helpers/Write-Log.ps1
Write-Log.ps1
<# .SYNOPSIS Log a message with the specified log level. .DESCRIPTION If the specified log level is higher as the configured log level, the message will be logged to the enabled destinations. These are the specified log file, the PowerShell event log and the current PowerShell console. .IN...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Helpers/Show-VerboseMessage.ps1
Show-VerboseMessage.ps1
<# .SYNOPSIS Shows a verbose message on the PowerShell host. .DESCRIPTION Uses the internal .NET method WriteVerboseLine() of the host UI class to show the verbose message on the console. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> Show-VerboseMessage -Message 'My Verbo...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Helpers/Show-InformationMessage.ps1
Show-InformationMessage.ps1
<# .SYNOPSIS Shows an information message on the PowerShell host. .DESCRIPTION Uses the internal .NET method () of the host UI class to show the information message on the console. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> Show-InformationMessage -Message 'My Informat...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Helpers/Show-ErrorMessage.ps1
Show-ErrorMessage.ps1
<# .SYNOPSIS Shows an error message on the PowerShell host. .DESCRIPTION Uses the internal .NET method WriteErrorLine() of the host UI class to show the error message on the console. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> Show-ErrorMessage -Message 'My Error Messag...
PowerShellCorpus/PowerShellGallery/ScriptLogger/2.0.0/Helpers/Show-WarningMessage.ps1
Show-WarningMessage.ps1
<# .SYNOPSIS Shows a warning message on the PowerShell host. .DESCRIPTION Uses the internal .NET method WriteWarningLine() of the host UI class to show the warning message on the console. .INPUTS None. .OUTPUTS None. .EXAMPLE PS C:\> Show-WarningMessage -Message 'My Warni...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/New-F5Item.ps1
New-F5Item.ps1
Function New-F5Item { param ( [Parameter(Mandatory=$true)] [string]$Name, [string]$Application, [string]$Partition ) $ItemPath = Get-ItemPath -Name $Name -Application $Application -Partition $Partition If ($ItemPath -match '^[~/](?<Partition>[^~/]*)[~/]((?<Applica...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/Resolve-NestedStats.ps1
Resolve-NestedStats.ps1
Function Resolve-NestedStats { <# .SYNOPSIS Between v11.6 and v12.0, there were breaking changes in regards to the JSON format returned for various iControlREST requests, such as when retrieving the system version or pool member stats. Specifically, instead of the data existing in an "entries" property dire...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/Invoke-NullCoalescing.ps1
Invoke-NullCoalescing.ps1
<# .SYNOPSIS Returns the first argument -ne $null, or $null if all arguments are $null. Similar to the C# ?? operator e.g. name = value ?? String.Empty .NOTES This was extracted from the PSCX module for internal use in this module without requiring a dependency on PSCX. .LINK https://github.com/flofreud/...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/Add-ObjectDetail.ps1
Add-ObjectDetail.ps1
function Add-ObjectDetail { <# .SYNOPSIS Decorate an object with - A TypeName - New properties - Default parameters .DESCRIPTION Helper function to decorate an object with - A TypeName - New properties - De...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/ArgumentCompletion.ps1
ArgumentCompletion.ps1
# Retrieve ALL ~/Public/*.ps1 Command names $Script:F5LTMPublicCommands = Get-ChildItem -Path ($PSScriptRoot -replace 'Private','Public') -Filter '*.ps1' -Recurse | Select-Object -ExpandProperty BaseName function Get-F5Command { <# .SYNOPSIS (Get-Command -Module F5-LTM) adversely affects module import perfor...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/Invoke-F5RestMethod.ps1
Invoke-F5RestMethod.ps1
Function Invoke-F5RestMethod { [cmdletBinding(DefaultParameterSetName='Anonymous')] [OutputType([Xml.XmlDocument])] [OutputType([Microsoft.PowerShell.Commands.HtmlWebResponseObject])] [OutputType([String])] [OutputType([bool])] param ( [Parameter(Mandatory)][Microsoft.PowerShell....
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/Get-ItemPath.ps1
Get-ItemPath.ps1
Function Get-ItemPath { param ( [Parameter(Mandatory=$false)][string]$Name, [Parameter(Mandatory=$false)][string]$Application, [Parameter(Mandatory=$false)][string]$Partition ) if ($Name -match '^[~/].*[~/]([^~/]*.app[~/])?.*$') { $Name -replace '/','~' } else { ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Private/Join-Object.ps1
Join-Object.ps1
Function Join-Object { [CmdletBinding()] [OutputType([int])] Param ( [Parameter(Mandatory=$true)] [AllowNull()] [object[]] $Left, [Parameter(Mandatory=$true)] [AllowNull()] [object[]] $Right, # Property or Expression to use to compare values on the left [Alias('OnLeft')] [ValidateSc...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-Pool.ps1
Remove-Pool.ps1
Function Remove-Pool { <# .SYNOPSIS Remove the specified pool(s). Confirmation is needed. .NOTES Pool names are case-specific. #> [cmdletBinding( SupportsShouldProcess=$true, ConfirmImpact='High')] param ( $F5Session=$Script:F5Session, [Alias('Pool')] [Parameter(Mand...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-iRule.ps1
Remove-iRule.ps1
Function Remove-iRule { <# .SYNOPSIS Remove the specified irule(s). Confirmation is needed. #> [cmdletBinding( SupportsShouldProcess=$true, ConfirmImpact='High')] param ( $F5Session=$Script:F5Session, [Alias('iRule')] [Parameter(Mandatory=$true,ParameterSetName='InputObjec...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-Node.ps1
Remove-Node.ps1
Function Remove-Node { <# .SYNOPSIS Remove the specified Node(s) .NOTES Node names are case-specific. #> [cmdletBinding( DefaultParameterSetName='Address', SupportsShouldProcess, ConfirmImpact='Medium')] param ( $F5Session=$Script:F5Session, [Alias('Node')] [Paramete...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/New-Pool.ps1
New-Pool.ps1
Function New-Pool { <# .SYNOPSIS Create a new pool. Optionally, add pool members to the new pool .DESCRIPTION Expects the $MemberDefinitionList param to be an array of strings. Each string should contain a computer name and a port number, comma-separated. Optionally, it can contain a descripti...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Test-Pool.ps1
Test-Pool.ps1
Function Test-Pool { <# .SYNOPSIS Test whether the specified pool(s) exist .NOTES Pool names are case-specific. #> [cmdletBinding()] [OutputType([bool])] param ( $F5Session=$Script:F5Session, [Alias('PoolName')] [Parameter(Mandatory=$true,ValueFromPipeline=$true...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-PoolsForMember.ps1
Get-PoolsForMember.ps1
Function Get-PoolsForMember { <# .SYNOPSIS Determine which pool(s) a server is in #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',ValueFromPipeline=$true)] [Alias('PoolMember')] [PSObject]$InputObje...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Set-VirtualServer.ps1
Set-VirtualServer.ps1
Function Set-VirtualServer { <# .SYNOPSIS Create or update VirtualServer(s) .DESCRIPTION Can create new or update existing VirtualServer(s). If a custom PS object is used, this function uses a defined list of known properties to correct any case discrepancie...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-HealthMonitor.ps1
Remove-HealthMonitor.ps1
Function Remove-HealthMonitor { <# .SYNOPSIS Remove the specified health monitor(s). Confirmation is needed. .NOTES Health monitor names are case-specific. #> [cmdletBinding( SupportsShouldProcess=$true, ConfirmImpact="Low")] param( $F5Session=$Script:F5Session, [Alias('H...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/New-F5Session.ps1
New-F5Session.ps1
Function New-F5Session{ <# .SYNOPSIS Generate an F5 session object to be used in querying and modifying the F5 LTM .DESCRIPTION This function takes the DNS name or IP address of the F5 LTM device, and a PSCredential credential object for a user with permissions to work with the REST API. Based on the ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Enable-PoolMember.ps1
Enable-PoolMember.ps1
Function Enable-PoolMember { <# .SYNOPSIS Enable a pool member in the specified pools If no pool is specified, the member will be enabled in all pools #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',ValueFromP...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-Node.ps1
Get-Node.ps1
Function Get-Node { <# .SYNOPSIS Retrieve specified Node(s) .NOTES This function makes no attempt to resolve names to ip addresses. If you are having trouble finding a node, try: Get-Node | Where-Object { $_.address -like 'N.N.N.N' -or $_.name -like 'XXXXX' } #> [cmdletBinding()] param...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Disable-VirtualServer.ps1
Disable-VirtualServer.ps1
Function Disable-VirtualServer { <# .SYNOPSIS Disable a virtual server #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Alias('VirtualServer')] [Parameter(Mandatory=$false,ParameterSetName='InputObject',ValueFromPipeline=$true)] [PSObject[]]$InputObject,...