full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/ChefAutomate/0.1.7/functions/Get-ChefAutomateComplianceProfiles.ps1
Get-ChefAutomateComplianceProfiles.ps1
<# .SYNOPSIS Returns the compliance profiles for a nominated owner. .DESCRIPTION Returns the compliance profiles for a nominated owner from the Chef Automate compliance store. .EXAMPLE C:\PS> Get-ChefAutomateComplianceProfiles -automateServer 'chef-automate.company.com' -automateOrgName OrgName ...
PowerShellCorpus/PowerShellGallery/ChefAutomate/0.1.7/functions/Set-SessionSecurityProtocol.ps1
Set-SessionSecurityProtocol.ps1
<# .SYNOPSIS Changes the session security protocol to TLS 1.2. .DESCRIPTION Changes the session security protocol to TLS 1.2 for the current PowerShell session only. .EXAMPLE C:\PS> Set-SessionSecurityProtocol .INPUTS None. .OUTPUTS Security protocol for the current session. #...
PowerShellCorpus/PowerShellGallery/ChefAutomate/0.1.7/functions/Set-ChefAutomateComplianceProfile.ps1
Set-ChefAutomateComplianceProfile.ps1
<# .SYNOPSIS Uploads the nominated compliance profile. .DESCRIPTION Uploads the nominated compliance profile from the Chef Automate compliance store. .EXAMPLE C:\PS> Set-ChefAutomateComplianceProfile -automateServer 'chef-automate.company.com' -automateOrgName OrgName -automateUser admin -autom...
PowerShellCorpus/PowerShellGallery/ChefAutomate/0.1.7/functions/Get-ChefAutomateStatus.ps1
Get-ChefAutomateStatus.ps1
<# .SYNOPSIS Returns the status of the nominated Chef Automate server. .DESCRIPTION Returns the status of the nominated Chef Automate server. Does not require an authentication token. .EXAMPLE C:\PS> Get-ChefAutomateStatus -automateServer 'chef-automate.company.com' .INPUTS Takes the DNS...
PowerShellCorpus/PowerShellGallery/ChefAutomate/0.1.7/functions/Remove-ChefAutomateComplianceProfile.ps1
Remove-ChefAutomateComplianceProfile.ps1
<# .SYNOPSIS Deletes the nominated compliance profile. .DESCRIPTION Deletes the nominated compliance profile from the Chef Automate compliance store. .EXAMPLE C:\PS> Remove-ChefAutomateComplianceProfile -automateServer 'chef-automate.company.com' -automateOrgName OrgName -automateUser admin -au...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Private/Import-HuBotConfiguration.ps1
Import-HuBotConfiguration.ps1
<# .Synopsis Imports a PoshHubot configuration file. .DESCRIPTION Imports a PoshHubot configuration file. .EXAMPLE Import-HubotConfiguration -ConfigPath C:\PoshHubot\config.json #> function Import-HubotConfiguration { [CmdletBinding()] Param ( # Path to the PoshHubot Configuration File ...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Private/Internal.ps1
Internal.ps1
Function Import-JsonConfig { <# .Synopsis Loads the XML Config File for Send-StatsToGraphite. .Description Loads the XML Config File for Send-StatsToGraphite. .Parameter ConfigPath Full path to the configuration XML file. .Example Import-JsonConfig -ConfigPath C:\Stats...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Private/Install-Chocolatey.ps1
Install-Chocolatey.ps1
function Install-Chocolatey { Write-Verbose -Message "Installing Chocolatey" Invoke-WebRequest -Uri 'https://chocolatey.org/install.ps1' -UseBasicParsing -OutFile "$($env:TEMP)\chocoinstall.ps1" ."$($env:TEMP)\chocoinstall.ps1" }
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Public/Install-Hubot.ps1
Install-Hubot.ps1
function Install-Hubot { [CmdletBinding()] Param ( # Path to the PoshHubot Configuration File [Parameter(Mandatory=$true, ValueFromPipeline=$true )] [ValidateScript({ if(Test-Path -Path $_ -ErrorAction SilentlyContinue) { return ...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Public/Remove-HubotScript.ps1
Remove-HubotScript.ps1
<# .Synopsis Short description .DESCRIPTION Long description .EXAMPLE Example of how to use this cmdlet .EXAMPLE Another example of how to use this cmdlet #> function Remove-HubotScript { [CmdletBinding(SupportsShouldProcess)] Param ( # Name of script to remove [Parameter(Mandato...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Public/Install-HubotScript.ps1
Install-HubotScript.ps1
<# .Synopsis Short description .DESCRIPTION Long description .EXAMPLE Example of how to use this cmdlet .EXAMPLE Another example of how to use this cmdlet #> function Install-HubotScript { [CmdletBinding()] Param ( # Name of script to remove [Parameter(Mandatory=$true)] $...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Public/New-PoshHubotConfiguration.ps1
New-PoshHubotConfiguration.ps1
<# .Synopsis Creates a new PoshHubot Configuration file. .DESCRIPTION Creates a new PoshHubot Configuration file. .EXAMPLE $newBot = @{ Path = "C:\PoshHubot\config.json" BotName = 'bender' BotPath = "C:\myhubot" BotAdapter = 'slack' BotOwner = 'matt' BotDescript...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Public/Start-Hubot.ps1
Start-Hubot.ps1
<# .Synopsis Short description .DESCRIPTION Long description .EXAMPLE Example of how to use this cmdlet .EXAMPLE Another example of how to use this cmdlet #> function Start-Hubot { [CmdletBinding()] Param ( # Path to the PoshHubot Configuration File [Parameter(Mandatory=$true)] ...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Public/Stop-Hubot.ps1
Stop-Hubot.ps1
<# .Synopsis Short description .DESCRIPTION Calls forever to stop Hubot. .EXAMPLE Example of how to use this cmdlet .EXAMPLE Another example of how to use this cmdlet #> function Stop-Hubot { [CmdletBinding(SupportsShouldProcess)] Param ( # Path to the PoshHubot Configuration File ...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Public/Restart-Hubot.ps1
Restart-Hubot.ps1
<# .Synopsis Restarts Hubot .DESCRIPTION Restarts Hubot .EXAMPLE Restart-Hubot -ConfigPath 'C:\PoshHubot\config.json' #> function Restart-Hubot { [CmdletBinding(SupportsShouldProcess)] Param ( # Path to the PoshHubot Configuration File [Parameter(Mandatory=$true)] [ValidateS...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Tests/appveyor.pester.ps1
appveyor.pester.ps1
# This script will invoke pester tests # It should invoke on PowerShell v2 and later # We serialize XML results and pull them in appveyor.yml #If Finalize is specified, we collect XML output, upload tests, and indicate build errors param( [switch]$Finalize, [switch]$Test, [string]$ProjectRoot = $ENV:APPVEY...
PowerShellCorpus/PowerShellGallery/PoshHubot/1.0.10/Tests/Unit/PoshHubot.Tests.ps1
PoshHubot.Tests.ps1
if(-not $PSScriptRoot) { $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } Import-Module $PSScriptRoot\..\..\PoshHubot.psd1 -Force InModuleScope PoshHubot { $config = @" { "Path": "TestDrive:\\PoshHubot\\config.json", "BotAdapter": "slack", "BotDebugLog": { "IsPresent": true }, "Bot...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Import-BitbucketServerAutomation.ps1
Import-BitbucketServerAutomation.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Get-BBServerTag.ps1
Get-BBServerTag.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Remove-BBServerRepository.ps1
Remove-BBServerRepository.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/New-BBServerTag.ps1
New-BBServerTag.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/New-BBServerProject.ps1
New-BBServerProject.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Use-CallerPreference.ps1
Use-CallerPreference.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Set-BBServerCommitBuildStatus.ps1
Set-BBServerCommitBuildStatus.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Invoke-BBServerRestMethod.ps1
Invoke-BBServerRestMethod.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/New-BBServerConnection.ps1
New-BBServerConnection.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Get-BBServerCommitBuildStatus.ps1
Get-BBServerCommitBuildStatus.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Add-PSTypeName.ps1
Add-PSTypeName.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Get-BBServerRepository.ps1
Get-BBServerRepository.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/New-BBServerRepository.ps1
New-BBServerRepository.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/BitbucketServerAutomation/0.1.0/Functions/Get-BBServerProject.ps1
Get-BBServerProject.ps1
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Get-OutlookInbox.ps1
Get-OutlookInbox.ps1
function Get-OutlookInbox { <# .SYNOPSIS OutlookConnector function: Returns array of messages from default Inbox folder. .DESCRIPTION Returns array of messages from default Inbox folder. If Outlook session is not passed as parameter Outlook, function will connect automatically. Messages are not filtered in an...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Start-Outlook.ps1
Start-Outlook.ps1
function Start-Outlook { <# .SYNOPSIS OutlookConnector function: Starts MS Outlook GUI. Used in case of issues with Connect-Outlook function. .DESCRIPTION Starts MS Outlook GUI. Used in case of issues with Connect-Outlook function. Issues usually occure due to slow or interactive Outlook start. If GUI starts ...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Get-OutlookFolder.ps1
Get-OutlookFolder.ps1
function Get-OutlookFolder { <# .SYNOPSIS OutlookConnector function: Returns array of Outlook folders from current Outlook session. .DESCRIPTION Function returns array of Outlook first level folders, or all folders from current Outlook session. Function is returning all properties from a folder for further pr...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/OutlookConnector.HelperFunctions.ps1
OutlookConnector.HelperFunctions.ps1
# Helper functions used within Outlook Connector module # Functions are not exported out of module function Get-ValidFileName { # refference https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 #https://gallery.technet.microsoft.com/scriptcenter/S...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Export-OutlookMessageBody.ps1
Export-OutlookMessageBody.ps1
#region synopsis #----------------------------------------------------[Function synopsis]----------------------------------------------------- Function Export-OutlookMessageBody { <# .SYNOPSIS OutlookConnector function: Saves message body of Outlook message to a file on disk. .DESCRIPTION S...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Export-OutlookFolder.ps1
Export-OutlookFolder.ps1
function Export-OutlookFolder { <# .SYNOPSIS OutlookConnector function: Saves all messages from passed Outlook folder to a disk. .DESCRIPTION Saves all messages from passed Outlook folder(s) to a disk. It will also process all contained subfolders. Function is internally calling Export-OutlookMessage function...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Connect-Outlook.ps1
Connect-Outlook.ps1
function Connect-Outlook { <# .SYNOPSIS OutlookConnector function: Returns Outlook object that can be re-used for multiple consecutive calls in same session. .DESCRIPTION Returns Outlook COM namespace session object that can be re-used for multiple consecutive calls with other commands. If you are using only ...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Export-OutlookMessage.ps1
Export-OutlookMessage.ps1
function Export-OutlookMessage { <# .SYNOPSIS OutlookConnector function: Saves Outlook message to a file on disk. .DESCRIPTION Saves one or messages to a file on disk at specified path. All messages are saved in same folder, and file names are built based on customizable parameter FileNameFormat. Messages can...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/Get-OutlookMessage.ps1
Get-OutlookMessage.ps1
function Get-OutlookMessage { <# .SYNOPSIS OutlookConnector function: Returns array of messages from one of default folders in Outlook. .DESCRIPTION Returns array of messages from one of default folders, i.e. Inbox, Drafts, SentMail, etc. .EXAMPLE Get-OutlookMessage SentMail | Group To | Sort Count -Descen...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Get-OutlookInbox.ps1
Get-OutlookInbox.ps1
function Get-OutlookInbox { <# .SYNOPSIS OutlookConnector function: Returns array of messages from default Inbox folder. .DESCRIPTION Returns array of messages from default Inbox folder. If Outlook session is not passed as parameter Outlook, function will connect automatically. Messages are not filtered in an...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Start-Outlook.ps1
Start-Outlook.ps1
function Start-Outlook { <# .SYNOPSIS OutlookConnector function: Starts MS Outlook GUI. Used in case of issues with Connect-Outlook function. .DESCRIPTION Starts MS Outlook GUI. Used in case of issues with Connect-Outlook function. Issues usually occure due to slow or interactive Outlook start. If GUI starts ...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Get-OutlookFolder.ps1
Get-OutlookFolder.ps1
function Get-OutlookFolder { <# .SYNOPSIS OutlookConnector function: Returns array of Outlook folders from current Outlook session. .DESCRIPTION Function returns array of Outlook first level folders, or all folders from current Outlook session. Function is returning all properties from a folder for further pr...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/OutlookConnector.HelperFunctions.ps1
OutlookConnector.HelperFunctions.ps1
# Helper functions used within Outlook Connector module # Functions are not exported out of module function Get-ValidFileName { # refference https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 #https://gallery.technet.microsoft.com/scriptcenter/S...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Export-OutlookMessageBody.ps1
Export-OutlookMessageBody.ps1
#region synopsis #----------------------------------------------------[Function synopsis]----------------------------------------------------- Function Export-OutlookMessageBody { <# .SYNOPSIS OutlookConnector function: Saves message body of Outlook message to a file on disk. .DESCRIPTION S...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Export-OutlookFolder.ps1
Export-OutlookFolder.ps1
function Export-OutlookFolder { <# .SYNOPSIS OutlookConnector function: Saves all messages from passed Outlook folder to a disk. .DESCRIPTION Saves all messages from passed Outlook folder(s) to a disk. It will also process all contained subfolders. Function is internally calling Export-OutlookMessage function...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Connect-Outlook.ps1
Connect-Outlook.ps1
function Connect-Outlook { <# .SYNOPSIS OutlookConnector function: Returns Outlook object that can be re-used for multiple consecutive calls in same session. .DESCRIPTION Returns Outlook COM namespace session object that can be re-used for multiple consecutive calls with other commands. If you are using only ...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Export-OutlookMessage.ps1
Export-OutlookMessage.ps1
function Export-OutlookMessage { <# .SYNOPSIS OutlookConnector function: Saves Outlook message to a file on disk. .DESCRIPTION Saves one or messages to a file on disk at specified path. All messages are saved in same folder, and file names are built based on customizable parameter FileNameFormat. Messages can...
PowerShellCorpus/PowerShellGallery/OutlookConnector/0.92.1/0.92/Get-OutlookMessage.ps1
Get-OutlookMessage.ps1
function Get-OutlookMessage { <# .SYNOPSIS OutlookConnector function: Returns array of messages from one of default folders in Outlook. .DESCRIPTION Returns array of messages from one of default folders, i.e. Inbox, Drafts, SentMail, etc. .EXAMPLE Get-OutlookMessage SentMail | Group To | Sort Count -Descen...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Start-RSAnalysis.ps1
Start-RSAnalysis.ps1
function Start-RSAnalysis { <# .SYNOPSIS Begins an analysis response .PARAMETER xml Retrieve XML rather than a parsed status response .OUTPUTS None #> [cmdletbinding()] Param( [Parameter(mandatory = $false)] [switch] $XML = $false ) begin...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSSystemStatus.ps1
Get-RSSystemStatus.ps1
function Get-RSSystemStatus { <# .SYNOPSIS Fetch the system status of the RedSeal Server .OUTPUTS A single system status object #> [cmdletbinding()] Param( [Parameter(Mandatory = $false)] [Switch] $XML ) begin { $uri = "https://" + $script:Se...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Send-RSRequest.ps1
Send-RSRequest.ps1
function Send-RSRequest { <# .SYNOPSIS Hack to allow selecting the desired version of the RedSeal API given the broken state of the Invoke-RestMethod cmdlet .PARAMETER uri URI to query .PARAMETER method HTTP method to use, defaults to GET .PARAMETER timeoutsec ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSModelIssue.ps1
Get-RSModelIssue.ps1
function Get-RSModelIssue { <# Gets the status of one or more model issue checks #> [cmdletbinding()] Param( [Parameter(Mandatory = $false, Position = 0, ValueFromPipeline = $True)] $IssueID ) begin { } process { Write-Verbose "Working on issue #: $($IssueID)" ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/ConvertFrom-RSDate.ps1
ConvertFrom-RSDate.ps1
function ConvertFrom-RSDate { <# .SYNOPSIS Converts from RedSeal timezone date to a .NET datetime object .PARAMETER RSDate RedSeal SQL date string .OUTPUTS A .NET datetime object #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $false,...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSConnections.ps1
Get-RSConnections.ps1
function Get-RSConnection { [pscustomobject]@{ Server = $script:Server Credentials = $script:Credentials APIVersion = $Script:APIVersion } }
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSView.ps1
Get-RSView.ps1
function Get-RSView { <# .SYNOPSIS Get all available views in RedSeal .OUTPUTS One custom object per view #> [cmdletbinding()] Param( ) begin { } process { $uri = "https://$script:Server/data/view" Write-Debug "Query URI is $uri" ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSHostDetail.ps1
Get-RSHostDetail.ps1
function Get-RSHostDetail { <# .SYNOPSIS Parses host XML to return host and metrics data .PARAMETER HostDetailXML RedSeal Host Detail XML GET response .OUTPUTS One custom object #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $tr...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Invoke-RSQuery.ps1
Invoke-RSQuery.ps1
function Invoke-RSQuery { <# .SYNOPSIS Invokes a synchronous RedSeal query .OUTPUTS One or more query result pairs .PARAMETER SourceSubnet Source subnet for detailed queries .PARAMETER DestinationSUbnet Destination subnet for detailed queries .PARAMETER Destinatio...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/New-RSGroup.ps1
New-RSGroup.ps1
function New-RSGroup { <# .SYNOPSIS Creates a new group custom object. To post to RedSeal, send the object to Set-RSGroup .PARAMETER GroupName Name of the top level group .PARAMETER GroupPath RedSeal path to the top level group .PARAMETER References Hash of Name, URL,...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSGroup.ps1
Get-RSGroup.ps1
function Get-RSGroup { <# .SYNOPSIS Get one or more groups from RedSeal .PARAMETER GroupPath Full path to the group .PARAMETER Recurse Crawl through subgroups and return individual group objects .PARAMETER XML Boolean switch to return the raw XML instead of a parsed o...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Remove-RSHost.ps1
Remove-RSHost.ps1
function Remove-RSHost { <# .SYNOPSIS Deletes a given host .PARAMETER TreeID RedSeal TreeID for a host object .PARAMETER Name DNS name of the host object .OUTPUTS Only a message #> [cmdletbinding(DefaultParameterSetName='SearchByName')] Param( [Pa...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSMetricsGroup.ps1
Get-RSMetricsGroup.ps1
function Get-RSMetricsGroup { <# Parses a single metrics query group #> [cmdletbinding()] Param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $True)] $DataQueryResults ) begin { } process { Write-Verbose "Working on $($DataQueryResults.Path.ToS...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Set-RSHost.ps1
Set-RSHost.ps1
function Set-RSHost { <# .SYNOPSIS Update a host object on RedSeal .PARAMETER HostObject Host object to update. May be an array of hosts. .PARAMETER XML Display generated XML, but do not post .INPUTS Full host object. .OUTPUTS One result object. #> [c...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Remove-RSGroup.ps1
Remove-RSGroup.ps1
function Remove-RSGroup { <# .SYNOPSIS Removes a group within RedSeal .PARAMETER GroupPath Path to group to remove .PARAMETER XML Boolean switch to return the raw XML instead of a parsed object .OUTPUTS Nothing. #> [cmdletbinding()] Param( [Parameter(V...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Read-RSReport.ps1
Read-RSReport.ps1
function Read-RSReport { <# .SYNOPSIS Reads RedSeal report .DESCRIPTION Reads RedSeal reports and converts the RedSeal XML into usable objects. .PARAMETER ReportName Name of the report to fetch and read .PARAMETER ReportFile Full path to file name to use in place of r...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Invoke-RSDataQuery.ps1
Invoke-RSDataQuery.ps1
function Invoke-RSDataQuery { [cmdletbinding()] Param( [Parameter(Mandatory = $false)] [String] $Group = "/Topology", #currently, Metrics is the only valid API type [Parameter(Mandatory = $false)] [ValidateSet('Metrics')] [String] $QueryR...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSHost.ps1
Get-RSHost.ps1
function Get-RSHost { <# .SYNOPSIS Get info on a given host .PARAMETER TreeID RedSeal TreeID for a host object .PARAMETER Name DNS name of the host object .PARAMETER FetchAll Fetches all host defined on the RedSeal server. Returns only the name, URL, and TreeID of hos...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Connect-RSServer.ps1
Connect-RSServer.ps1
function Connect-RSServer { <# .SYNOPSIS Set connection parameters for the RedSeal cmdlets .OUTPUTS None #> Param( [Parameter(Mandatory=$false, Position = 0)] [string] $Server, [Parameter(Mandatory=$false, Position = 1)] [PSCredential] ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Set-RSQueryTarget.ps1
Set-RSQueryTarget.ps1
function Set-RSQueryTarget { <# .SYNOPSIS Creates a target object for consumption by Invoke-RSQuery .PARAMETER Type Type of query target to create .PARAMETER TreeID TreeID to target .PARAMETER Ports Ports to target .PARAMETER Protocols Protocols to target ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSReportList.ps1
Get-RSReportList.ps1
function Get-RSReportList { <# .SYNOPSIS Gets available RedSeal reports .DESCRIPTION Gets all available RedSeal reports .OUTPUTS One report object per visible report. #> [cmdletbinding()] Param( ) begin { } process { #$reportListXml = Invo...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Read-RSImpactResult.ps1
Read-RSImpactResult.ps1
function Read-RSImpactResult { <# .SYNOPSIS Parses XML from a RedSeal impact query .PARAMETER RawXML Raw impact XML to parse .OUTPUTS One custom object per traffic segment #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $true, Positio...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSSystemLicense.ps1
Get-RSSystemLicense.ps1
function Get-RSSystemLicense { <# .SYNOPSIS Fetch the system license of the RedSeal Server .OUTPUTS A single system license object .PARAMETER xml Switch to return the raw XML response rather than a parsed object #> [cmdletbinding()] Param( [Parameter(Mandatory = ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Set-RSGroup.ps1
Set-RSGroup.ps1
function Set-RSGroup { <# .SYNOPSIS Sets or creates a group within RedSeal .PARAMETER Group Group object to set in RedSeal .PARAMETER XML Boolean switch to return the raw XML instead of a parsed object .OUTPUTS Nothing. #> [cmdletbinding(SupportsShouldProcess = $t...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Read-RSAccessResult.ps1
Read-RSAccessResult.ps1
function Read-RSAccessResult { <# .SYNOPSIS Parses XML from a RedSeal access query .OUTPUTS One custom object per traffic segment #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $true, Position = 0)] [XML] $RawXML ) begin...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSDeviceDetail.ps1
Get-RSDeviceDetail.ps1
function Get-RSDeviceDetail { <# .SYNOPSIS Parses device XML .PARAMETER DeviceXML RedSeal Device XML GET response .OUTPUTS One custom object #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $true, Position = 0)] $DeviceDet...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSMetricsDetails.ps1
Get-RSMetricsDetails.ps1
function Get-RSMetricsDetail { <# .SYNOPSIS Internal function for parsing DataQuery results objects into host objects .INPUT Expects one metrics object and the path to that object .OUTPUTS Returns one host metrics object for each metrics result #> [cmdletbinding()] Param( ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSCollectionTask.ps1
Get-RSCollectionTask.ps1
function Get-RSCollectionTask { <# .SYNOPSIS Retrieve the list of data collection tasks. .OUTPUTS One custom object per data collection task. #> [cmdletbinding()] Param( ) begin { $uri = "https://$script:server/data/import/task" } process { ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSSubnet.ps1
Get-RSSubnet.ps1
function Get-RSSubnet { <# .SYNOPSIS Get info on a given subnet .PARAMETER TreeID TreeID of subnet object .PARAMETER Name Name or IP address space of the subnet to get .PARAMETER XML Return the raw XML instead of a parsed object .PARAMETER Recurse Return o...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/New-RSHost.ps1
New-RSHost.ps1
function New-RSHost { <# .SYNOPSIS Creates a new Host custom object. To post to RedSeal, send the object to Set-RSHost .OUTPUTS One custom object #> [cmdletbinding(SupportsShouldProcess = $true)] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $true, Position = ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSAdminTaskHistory.ps1
Get-RSAdminTaskHistory.ps1
function Get-RSAdminTaskHistory { <# Retrieves task history #> [cmdletbinding()] Param( [Parameter(Mandatory = $false)] [switch]$XML = $false ) begin { } process { $uri = $uri = 'https://' + $script:Server + '/data/system/adminoperation' $response = Send-RS...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Start-RSAdminTask.ps1
Start-RSAdminTask.ps1
function Start-RSAdminTask { <# Initiates an administrative task #> [cmdletbinding()] Param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $True)] [ValidateSet("Backup", "Restore", "PluginUpload", "ImageSetNext", "ImageDelete", "RebootAppliance")] $...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Read-RSPathResult.ps1
Read-RSPathResult.ps1
function Read-RSPathResult { <# .SYNOPSIS Parses XML from a RedSeal detailed path query .PARAMETER RawXML Raw path XML to parse .OUTPUTS Still figuring that out... #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $true, Position = 0)] ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSComputer.ps1
Get-RSComputer.ps1
function Get-RSComputer { <# .SYNOPSIS Get info on a given host or device using the generic RedSeal computer call .PARAMETER TreeID RedSeal TreeID for a host or device object .PARAMETER Name DNS name of the computer object .PARAMETER FetchAll Fetches all computers def...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Import-RSScanFile.ps1
Import-RSScanFile.ps1
function Import-RSScanFile { <# Import a vulnerability scan file into RedSeal #> [cmdletbinding()] Param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $True)] $FilePath, [Parameter(Mandatory = $false, Position = 1, ValueFromPipeline = $True)] $ScannerType...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Read-RSThreatResult.ps1
Read-RSThreatResult.ps1
function Read-RSThreatResult { <# .SYNOPSIS Parses XML from a RedSeal threat query .PARAMETER RawXML Raw XML to parse .OUTPUTS One custom object per traffic segment #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $true, Position = 0)]...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/ConvertTo-RSData.ps1
ConvertTo-RSData.ps1
function ConvertTo-RSDate { <# .SYNOPSIS Converts from .NET datetime object to RedSeal timezone date .PARAMETER RSDate .NET datetime object .OUTPUTS A RedSeal datetime string #> [cmdletbinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory = $false, Pos...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Set-RSDataQuery.ps1
Set-RSDataQuery.ps1
function Set-RSDataQuery { <# .SYNOPSIS Sets a RS Data Query object (RS 6.6+ API) .PARAMETER Group Group path to filter/group results .PARAMETER QueryType Type of DataQuery to run .PARAMETER QueryTarget Host or subnet information .PARAMETER QueryFilter ...
PowerShellCorpus/PowerShellGallery/PSRedSeal/1.2.3.0/public/Get-RSDevice.ps1
Get-RSDevice.ps1
function Get-RSDevice { <# .SYNOPSIS Get info on a given device .PARAMETER TreeID RedSeal TreeID for a device object .PARAMETER Name DNS name of the device object .OUTPUTS One custom object per device. #> [cmdletbinding(DefaultParameterSetName='SearchByName')] ...
PowerShellCorpus/PowerShellGallery/AzureRM.RecoveryServices.Backup/3.1.0/AzureRmRecoveryServicesStartup.ps1
AzureRmRecoveryServicesStartup.ps1
# ---------------------------------------------------------------------------------- # # Copyright Microsoft Corporation # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apach...
PowerShellCorpus/PowerShellGallery/Dock-PS/1.0/Dock-PS.prepare.ps1
Dock-PS.prepare.ps1
<# MIT License Copyright © 2017 by Gee Law 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, copy, modify, merge, publish, ...
PowerShellCorpus/PowerShellGallery/Octopus/1.0/Tests/OctopusServer.ps1
OctopusServer.ps1
$currentFolder = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition $Module = 'Octopus' $DSCResource = 'OctopusServer' $moduleFolder = Split-Path -Parent -Path $currentFolder Describe "$DSCResource Test-TargetResource"{ Copy-Item "$moduleFolder\DSCResources\$DSCResource\$DSCResource.psm1" ...
PowerShellCorpus/PowerShellGallery/cSQLServerJDBCXA/1.0.0/Examples/Enable-JDBCXA.ps1
Enable-JDBCXA.ps1
#requires -Version 5 Configuration SQLServerXA { param ( [Parameter(Mandatory)] [PSCredential] $InstallCredential, [Parameter(Mandatory)] [PSCredential] $SACredential ) Import-DscResource -ModuleName 'PSDesiredStateConfiguration' Import-DSCResource ...
PowerShellCorpus/PowerShellGallery/LoremIpsum/1.0/LoremIpsum.Tests.ps1
LoremIpsum.Tests.ps1
Import-Module (Join-Path $PSScriptRoot 'LoremIpsum.psd1') -Force -ErrorAction Stop Describe "New-LoremIpsum" { Context "minWords is 5" { It "Should return at least 5 words"{ $LoremIpsum = New-LoremIpsum -minWords 5 -maxWords 10 -minSentences 1 -maxSentences 1 -numParagraphs 1 ...
PowerShellCorpus/PowerShellGallery/MrAAzure/1.8.1/Install-AzureRmVMExtension.ps1
Install-AzureRmVMExtension.ps1
<# .Synopsis Install-AzureRmVMExtension simplifies the process of installing VM extensions on Azure IaaS resource manager VM's. .DESCRIPTION Install-AzureRmVMExtension simplifies the process of installing VM extensions on Azure IaaS resource manager VM's. .NOTES Created by: Jason Wasser @wasser...
PowerShellCorpus/PowerShellGallery/MrAAzure/1.8.1/Get-AzurePublicIPList.ps1
Get-AzurePublicIPList.ps1
<# .Synopsis Get a list of the Azure Public IP addresses/subnets per region. .DESCRIPTION Get a list of the Azure Public IP addresses/subnets per region. The script scrapes the Microsoft download page to find the URL to the current Azure Public IP list xml file. Then it downloads the file to a tem...
PowerShellCorpus/PowerShellGallery/MrAAzure/1.8.1/Get-AzureRmVirtualNetworkGatewayStatistics.ps1
Get-AzureRmVirtualNetworkGatewayStatistics.ps1
<# .Synopsis Generate and collect logs from an Azure Resource Manager virtual network gateway. .DESCRIPTION When deploying a virtual network gateway in Azure you may need to troubleshoot if connectivity issues arise. At the time of writing this script, both the Azure and AzureRM PowerShell modules ar...
PowerShellCorpus/PowerShellGallery/MrAAzure/1.8.1/Copy-AzureBlob.ps1
Copy-AzureBlob.ps1
<# .Synopsis Copy blob files (vhds) between Azure storage accounts. .DESCRIPTION Copy VHD blob files (vhds) between Azure storage accounts. Sometimes it is necessary to copy VHD files between storage accounts in Azure. In addition you may need to copy VHD files between storage accounts located i...
PowerShellCorpus/PowerShellGallery/MrAAzure/1.8.1/Get-AzureRmVMAvailableExtension.ps1
Get-AzureRmVMAvailableExtension.ps1
<# .Synopsis Get a list of available extensions for Azure IaaS VM's. .DESCRIPTION Get a list of available extensions for Azure IaaS VM's using the Azure RM PowerShell modules. The Get-AzureVMAvailableExtension has not yet been ported to the new ARM PowerShell module. Use this function as a ...
PowerShellCorpus/PowerShellGallery/MrAAzure/1.8.1/Set-AzureCustomRouteTable.ps1
Set-AzureCustomRouteTable.ps1
<# .Synopsis Set-AzureCustomRouteTable assists in creating and modifying Azure route tables. .DESCRIPTION Set-AzureCustomRouteTable assists in creating and modifying Azure route tables. The function will create a new route table if it doesn't exist, or modify a route table if it does exist. Additional...
PowerShellCorpus/PowerShellGallery/MrAAzure/1.8.1/Test-AzureRmLogin.ps1
Test-AzureRmLogin.ps1
<# .Synopsis Test to verify if you are signed into Azure Rm PowerShell. .DESCRIPTION Test to verify if you are signed into Azure Rm PowerShell. .NOTES Created by: Jason Wasser @wasserja Modified: 3/15/2016 08:42:05 PM Version 1.0 .EXAMPLE Test-AzureRmLogin $True #> #Requires -Modu...