full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/O365ServiceCommunications/1.4/functions/Get-SCTenantServiceInfo.ps1 | Get-SCTenantServiceInfo.ps1 | function Get-SCTenantServiceInfo
{
[CmdletBinding()]
param
(
[Parameter(Mandatory)]
[PSTypeName('O365ServiceCommunications.Session')]
$SCSession,
[Parameter(Mandatory)]
[System.String[]]
$Domains
)
$Body = @{
lastCookie = $SCSession.Cookie
locale = $SCSe... |
PowerShellCorpus/PowerShellGallery/O365ServiceCommunications/1.4/functions/Get-SCEvent.ps1 | Get-SCEvent.ps1 | function Get-SCEvent
{
<#
.SYNOPSIS
Returns events from the Service Communications API.
.DESCRIPTION
Returns events from the Service Communications API. These events can be Incidents, Maintenance messages, or just
informational messages.
.PARAMETER EventTypes
Specifies the types of events that you would... |
PowerShellCorpus/PowerShellGallery/O365ServiceCommunications/1.4/functions/Get-SCServiceInfo.ps1 | Get-SCServiceInfo.ps1 | function Get-SCServiceInfo
{
<#
.SYNOPSIS
Returns information about the services available to the Office 365 Service Communications API.
.DESCRIPTION
Returns information about the services available to the Office 365 Service Communications API.
.PARAMETER SCSession
Specifies the Service Communications sess... |
PowerShellCorpus/PowerShellGallery/O365ServiceCommunications/1.4/functions/New-SCSession.ps1 | New-SCSession.ps1 | function New-SCSession
{
<#
.SYNOPSIS
Connects to the Office 365 Service Communications API using your administrator account credentials.
.DESCRIPTION
Connects to the Office 365 Service Communications API using your administrator account credentials. This
generates a cookie that authenticates your accoun... |
PowerShellCorpus/PowerShellGallery/CertificateHealth/1.4/Get-CertificateHealth.ps1 | Get-CertificateHealth.ps1 | <#
.Synopsis
Get certificates from the filesystem or certificate store and display their health
for expiration, pending expiration, and deprecated signature algorithms.
.DESCRIPTION
Get certificates from the filesystem or certificate store and display their health
for expiration, pending expiration, a... |
PowerShellCorpus/PowerShellGallery/CertificateHealth/1.4/Get-UnhealthyCertificate.ps1 | Get-UnhealthyCertificate.ps1 | <#
.Synopsis
Get-UnhealhtyCertificate checks the local certificate store or file system for
unhealthy SSL certificates.
.DESCRIPTION
Get-UnhealhtyCertificate checks the local certificate store or file system for
unhealthy SSL certificates. Get-UnhealthyCertificate uses the Get-CertificateHealth
... |
PowerShellCorpus/PowerShellGallery/CertificateHealth/1.4/Get-UnhealthyCertificateNagios.ps1 | Get-UnhealthyCertificateNagios.ps1 | <#
.Synopsis
Get-UnhealhtyCertificateNagios checks the local certificate store or file system for
unhealthy SSL certificates.
.DESCRIPTION
Get-UnhealhtyCertificateNagios checks the local certificate store or file system for
unhealthy SSL certificates. Get-UnhealthyCertificate uses the Get-Certifica... |
PowerShellCorpus/PowerShellGallery/CertificateHealth/1.4/Get-CertificateFile.ps1 | Get-CertificateFile.ps1 | <#
.Synopsis
Get certificate files from a specified path or paths and
return an object of the certificate including File name, Subject name,
the signature algorithm used, validity dates, and thumbprint.
.DESCRIPTION
Get certificate files from a specified path or paths and
return an object of the c... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/PesterHelpers.Min.Tests.ps1 | PesterHelpers.Min.Tests.ps1 | $Here = Split-Path -Parent $MyInvocation.MyCommand.Path
$PrivateFunctions = Get-ChildItem "$here\Private\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PublicFunctions = Get-ChildItem "$here\Public\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PrivateFunct... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/PesterHelpers.Norm.Tests.ps1 | PesterHelpers.Norm.Tests.ps1 | $Here = Split-Path -Parent $MyInvocation.MyCommand.Path
$PrivateFunctions = Get-ChildItem "$here\Private\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PublicFunctions = Get-ChildItem "$here\Public\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PrivateFunct... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/PesterHelpers.Full.Tests.ps1 | PesterHelpers.Full.Tests.ps1 | $Here = Split-Path -Parent $MyInvocation.MyCommand.Path
$PrivateFunctions = Get-ChildItem "$here\Private\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PublicFunctions = Get-ChildItem "$here\Public\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PrivateFunct... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Norm-ModuleTests.ps1 | Norm-ModuleTests.ps1 | $Here = Split-Path -Parent $MyInvocation.MyCommand.Path
$PrivateFunctions = Get-ChildItem "$here\Private\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PublicFunctions = Get-ChildItem "$here\Public\" -Filter '*.ps1' -Recurse | Where-Object {$_.name -NotMatch "Tests.ps1"}
$PrivateFunct... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Private/Get-CommonParameter.ps1 | Get-CommonParameter.ps1 | function Get-CommonParameter {
<#
.SYNOPSIS
Helper Function to get all Common Parameters
.DESCRIPTION
As synopsis
.EXAMPLE
$CommonParameters = (Get-Command Get-CommonParameter | Select-Object -ExpandProperty Parameters).Keys
This gets all Common Parameters into a Varaib... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Private/Tests/Get-CommonParameter.Tests.ps1 | Get-CommonParameter.Tests.ps1 | Describe 'Get-CommonParameter Tests' {
Context 'Parameters for Get-CommonParameter'{
}
Context "Function $($function.Name) - Help Section" {
It "Function $($function.Name) Has show-help comment block" {
$function.Definition.Contains('<#') | should be 'True'
... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/Export/Export-AllModuleFunction.ps1 | Export-AllModuleFunction.ps1 | Function Export-AllModuleFunction {
<#
.Synopsis
Exports All Module Functions into Separate PS1 files
.DESCRIPTION
Exposes all Private and Public Functions and exports them to a location that you tell it to Export to & Creates a Basic Shell Pester Test for the Function
.PARAMETER Module
This should... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/Export/Export-Function.ps1 | Export-Function.ps1 | function Export-Function {
<#
.Synopsis
Exports a function from a module into a user given path
.Description
As synopsis
.PARAMETER Function
This Parameter takes a String input and is used in Both Parameter Sets
.PARAMETER ResolvedFunction
This should be passed the Function that ... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/Export/Tests/Export-Function.Tests.ps1 | Export-Function.Tests.ps1 | Describe 'Export-Function Tests' {
Context 'Parameters for Export-Function'{
It 'Has a Parameter called Function' {
$Function.Parameters.Keys.Contains('Function') | Should Be 'True'
}
It 'Function Parameter is Identified as Mandatory being True True' {
[S... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/Export/Tests/Export-AllModuleFunction.Tests.ps1 | Export-AllModuleFunction.Tests.ps1 | Describe 'Export-AllModuleFunction Tests' {
Context 'Parameters for Export-AllModuleFunction'{
It 'Has a Parameter called Module' {
$Function.Parameters.Keys.Contains('Module') | Should Be 'True'
}
It 'Module Parameter is Identified as Mandatory being True' {
... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/Export/Tests/Export-Function.Functional.Tests.ps1 | Export-Function.Functional.Tests.ps1 | Describe 'Export-Function' {
$FunctionValue = "New-FunctionPesterTest"
$FunctionVerbValue = "New"
$OutpathValue = 'C:\TextFile\PTest\'
$NewItemPath = "$OutpathValue\$FunctionVerbValue\$FunctionValue.ps1"
$tests = $NewItemPath
$VerboseMessage1 = "Full O... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/New/New-FunctionFile.ps1 | New-FunctionFile.ps1 | function New-FunctionFile {
<#
.SYNOPSIS
This is the Short Description field for $functionName
.DESCRIPTION
This is the Long Description field for $functionName
.PARAMETER FunctionName
.EXAMPLE
New-FunctionFile -FunctionName Test-FunctionFile
#>
[Cmdletbinding(SupportsShouldProcess=$true)]
par... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/New/New-ModulePesterTest.ps1 | New-ModulePesterTest.ps1 | function New-ModulePesterTest {
<#
.SYNOPSIS
Creates a ps1 file that includes a subset of basic pester tests
.DESCRIPTION
As synopsis
.PARAMETER ModuleName
.PARAMETER OutPath
.EXAMPLE
New-ModulePesterTests -ModuleName SPCSPS
This will get the SPCSPS module and the path that is asocciated with it and... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/New/New-FunctionPesterTest.ps1 | New-FunctionPesterTest.ps1 | Function New-FunctionPesterTest {
<#
.SYNOPSIS
This Function Creates 2 Pester Test files for the Function being passed to it
.DESCRIPTION
This Function creates a skeleton pester test file for the Function that is being passed to it including whether the
Function has Parameters and creates some basic Pe... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/New/Tests/New-FunctionPesterTest.Functional.Tests.ps1 | New-FunctionPesterTest.Functional.Tests.ps1 | Describe "New-FunctionPesterTest" {
$FunctionValue = "Export-Function"
$FunctionVerbValue = "Export"
$OutpathValue = 'C:\TextFile\PTest\'
$NewItemPath = "$OutpathValue\$FunctionVerbValue\$FunctionValue.Tests.ps1"
$tests = $NewItemPath
$ExpectedValue = ... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/New/Tests/New-FunctionFile.Tests.ps1 | New-FunctionFile.Tests.ps1 | Describe 'New-FunctionFile Tests' {
Context 'Parameters for New-FunctionFile'{
It 'Has a Parameter called FunctionName' {
$Function.Parameters.Keys.Contains('FunctionName') | Should Be 'True'
}
It 'FunctionName Parameter is Identified as Mandatory being False' {
... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/New/Tests/New-FunctionPesterTest.Tests.ps1 | New-FunctionPesterTest.Tests.ps1 | Describe 'New-FunctionPesterTest Tests' {
Context 'Parameters for New-FunctionPesterTest'{
It 'Has a Parameter called Function' {
$Function.Parameters.Keys.Contains('Function') | Should Be 'True'
}
It 'Function Parameter is Identified as Mandatory being True True' {
... |
PowerShellCorpus/PowerShellGallery/PesterHelpers/0.0.6/Public/New/Tests/New-ModulePesterTest.Tests.ps1 | New-ModulePesterTest.Tests.ps1 | Describe 'New-ModulePesterTest Tests' {
Context 'Parameters for New-ModulePesterTest'{
It 'Has a Parameter called ModuleName' {
$Function.Parameters.Keys.Contains('ModuleName') | Should Be 'True'
}
It 'ModuleName Parameter is Identified as Mandatory being False' {
... |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/Examples/dsc_configuration.ps1 | dsc_configuration.ps1 | configuration Hubot
{
Import-DscResource -ModuleName PSDesiredStateConfiguration
Import-DscResource -Name MSFT_xRemoteFile -ModuleName xPSDesiredStateConfiguration
Import-DscResource -ModuleName @{ModuleName="Hubot"; RequiredVersion="1.1.5"}
node $AllNodes.Where{$_.Role -eq "Hubot"}.NodeName
{ ... |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/Examples/HubotInstallService_Example.ps1 | HubotInstallService_Example.ps1 | # See dsc_configuration.ps1 |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/Examples/HubotInstall_Example.ps1 | HubotInstall_Example.ps1 | # See dsc_configuration.ps1 |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/Tests/HubotHelpers_Unit_Tests.ps1 | HubotHelpers_Unit_Tests.ps1 | #################
# TEST HEADER #
#################
$dscModule = 'Hubot'
$originalLocation = Get-Location
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $here
describe "HubotHelpers" {
######################################
# USED FOR TESTING CLASS BASED DSC #
############... |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/Tests/HubotInstallService_Unit_Tests.ps1 | HubotInstallService_Unit_Tests.ps1 | #################
# TEST HEADER #
#################
$dscModule = 'Hubot'
$originalLocation = Get-Location
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $here
describe "HubotInstallService" {
######################################
# USED FOR TESTING CLASS BASED DSC #
########... |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/Tests/Hubot_MOF_Generation_Tests.ps1 | Hubot_MOF_Generation_Tests.ps1 | describe "Hubot DSC Module - MOF Testing" {
$dscExamplePath = Join-path -Path '.\Examples' -ChildPath 'dsc_configuration.ps1'
context "Get-DSCResource" {
$res = Get-DscResource
it "returns something" {
$res | Should Not Be Null
}
$hubotRes = @(
... |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/Tests/HubotInstall_Unit_Tests.ps1 | HubotInstall_Unit_Tests.ps1 | #################
# TEST HEADER #
#################
$dscModule = 'Hubot'
$originalLocation = Get-Location
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $here
describe "HubotInstall" {
######################################
# USED FOR TESTING CLASS BASED DSC #
###############... |
PowerShellCorpus/PowerShellGallery/Hubot/1.1.5/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/Hubot/1.1.5/Tests/integration/default/pester/default.tests.ps1 | default.tests.ps1 | describe "Hubot" {
Context "File Paths and Installs" {
$pathsToTest = @(
'C:\Program Files\Git\bin\git.exe'
'C:\Program Files\nodejs\node.exe'
'C:\nssm'
'C:\myhubot'
'C:\myhubot\node_modules'
'C:\myhubot\node_modules\edge'
... |
PowerShellCorpus/PowerShellGallery/AWSPowerShell/3.3.104.0/AWSAliases.ps1 | AWSAliases.ps1 | Set-Alias -Name AG-TestInvokeAuthorizer -Value Test-AGInvokeAuthorizer
Set-Alias -Name AG-TestInvokeMethod -Value Test-AGInvokeMethod
Set-Alias -Name AG-UpdateAccount -Value Update-AGAccount
Set-Alias -Name AG-UpdateApiKey -Value Update-AGApiKey
Set-Alias -Name AG-UpdateAuthorizer -Value Update-AGAuthorizer
Set-Al... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Helper/Write-Log.ps1 | Write-Log.ps1 | function Write-Log {
<#
.Synopsis
Write-Log / Log
Logs text to the console and/or to a file.
.DESCRIPTION
A comprehensive helper function for structured logging.
Writes one or more messages to the different available outputchannels of the powershell and to one or mor... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Helper/Set-TypesNamesToPRTGObject.ps1 | Set-TypesNamesToPRTGObject.ps1 | function Set-TypesNamesToPRTGObject ($PRTGObject) {
<#
.Synopsis
Set-TypesNamesToPRTGObject
.DESCRIPTION
Add module specific type names to result objects of a function.
.NOTES
Author: Andreas Bellstedt
.EXAMPLE
Set-TypesNamesToPRTGObject $PRTGObject
... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Helper/Compare-ObjectProperty.ps1 | Compare-ObjectProperty.ps1 |
<#PSScriptInfo
.VERSION 1.0.0.4
.GUID 32a4f2d6-b021-4a38-8b6a-d76ceef2b02d
.AUTHOR Jeffrey Snover
.COMPANYNAME
.COPYRIGHT
.TAGS
.LICENSEURI
.PROJECTURI
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES
#>
function Compar... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/TypeDefinition/TypeDefinition.ps1 | TypeDefinition.ps1 | #Author: Andreas Bellstedt
#region PRTG
$TypeName = "PRTG"
Write-Verbose "Update TypeData $TypeName"
Update-TypeData -TypeName $TypeName -MemberType ScriptProperty -MemberName ObjID -Value { [int32]$this.id[0] } -Force
Update-TypeData -TypeName $TypeName -MemberType ScriptProperty -MemberName Type -Value { $thi... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Compare-PRTGDeviceSensorsFromTemplateTAG.ps1 | Compare-PRTGDeviceSensorsFromTemplateTAG.ps1 | function Compare-PRTGDeviceSensorsFromTemplateTAG {
<#
.Synopsis
Compare-PRTGDeviceSensorsFromTemplateTAG
.DESCRIPTION
Compares all sensors on a device by all the tags on the device against a (template) object.
In default all tags starting with "Template_" are used for compa... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGGroup.ps1 | Get-PRTGGroup.ps1 | function Get-PRTGGroup {
<#
.Synopsis
Get-PRTGGroup
.DESCRIPTION
Returns one or more groups from sensortree
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Get-PRTGGroup
Query all groups from ... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Remove-PRTGObject.ps1 | Remove-PRTGObject.ps1 | function Remove-PRTGObject {
<#
.Synopsis
Remove-PRTGObject
.DESCRIPTION
Remove an object from PRTGserver and returns.
Difference to Get-PRTGObject is, that "Get-PRTGObject" is working on a modfified sensortree variable in the memory and not on livedata from PRTGServer
.N... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Receive-PRTGObjectDetail.ps1 | Receive-PRTGObjectDetail.ps1 | function Receive-PRTGObjectDetail {
<#
.Synopsis
Receive-PRTGObjectDetail
.DESCRIPTION
Query status information for an object directly from PRTGserver.
(function not working on sensortree variable in memory)
.NOTES
Author: Andreas Bellstedt
.LINK
... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Move-PRTGObjectPosition.ps1 | Move-PRTGObjectPosition.ps1 | function Move-PRTGObjectPosition {
<#
.Synopsis
Move-PRTGObjectPosition
.DESCRIPTION
Moves an object in PRTG hierarchy
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Move-PRTGObject -ObjectId 1 -Dire... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGObject.ps1 | Get-PRTGObject.ps1 | function Get-PRTGObject {
<#
.Synopsis
Get-PRTGObject
.DESCRIPTION
Returns one more multiple types of objects from sensortree
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Get-PRTGObject
Que... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGSensor.ps1 | Get-PRTGSensor.ps1 | function Get-PRTGSensor {
<#
.Synopsis
Get-PRTGSensor
.DESCRIPTION
Returns one or more sensors from sensortree
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Get-PRTGSensor
Query all sensors ... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/New-PRTGDefaultFolderStructureToProbe.ps1 | New-PRTGDefaultFolderStructureToProbe.ps1 | function New-PRTGDefaultFolderStructureToProbe {
<#
.Synopsis
New-PRTGDefaultFolderStructureToProbe
.DESCRIPTION
Copy a new folder/group structure to a destination
Primary intension is to copy a tempalte folderstructure to a new probe
.NOTES
Author: Andreas B... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGObjectTAG.ps1 | Get-PRTGObjectTAG.ps1 | function Get-PRTGObjectTAG {
<#
.Synopsis
Get-PRTGObjectTAG
.DESCRIPTION
Get the tags property from an PRTG object out of the sensor tree and returns a string array
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXA... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Set-PRTGObjectPriority.ps1 | Set-PRTGObjectPriority.ps1 | function Set-PRTGObjectPriority {
<#
.Synopsis
Set-PRTGObjectPriority
.DESCRIPTION
Set priority value on a PRTG object
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Set-PRTGObjectPriority -ObjectId 1... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Show-PRTGTemplateSummaryFromObjectTAG.ps1 | Show-PRTGTemplateSummaryFromObjectTAG.ps1 | function Show-PRTGTemplateSummaryFromObjectTAG {
<#
.Synopsis
Show-PRTGTemplateRoles
.DESCRIPTION
Display a list of template roles found under in groups and devices under a prtg structure
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/An... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGObjectProperty.ps1 | Get-PRTGObjectProperty.ps1 | function Get-PRTGObjectProperty {
<#
.Synopsis
Get-PRTGObjectProperty
.DESCRIPTION
Get a specific property from an PRTG object out of the sensor tree
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Ge... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Test-PRTGObjectNotification.ps1 | Test-PRTGObjectNotification.ps1 | function Test-PRTGObjectNotification {
<#
.Synopsis
Test-PRTGObjectNotification
.DESCRIPTION
Test a notifcation action for a object
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Test-PRTGObjectN... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGDevice.ps1 | Get-PRTGDevice.ps1 | function Get-PRTGDevice {
<#
.Synopsis
Get-PRTGDevice
.DESCRIPTION
Returns one or more devices from sensortree
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Get-PRTGDevice
Query all devices ... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Set-PRTGObjectProperty.ps1 | Set-PRTGObjectProperty.ps1 | function Set-PRTGObjectProperty {
<#
.Synopsis
Set-PRTGObjectProperty
.DESCRIPTION
Set the property of an PRTG object
.NOTES
Author: Andreas Bellstedt
adopted from PSGallery Module "PSPRTG"
Author: Sam-Martin
Github: https://github.com/Sam-Ma... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Set-PRTGModuleLogging.ps1 | Set-PRTGModuleLogging.ps1 | function Set-PRTGModuleLogging {
<#
.Synopsis
Set-PRTGModuleLogging
.DESCRIPTION
%ToDo%
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
%ToDo%
#>
[CmdletBinding(DefaultParameterSetName='De... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Enable-PRTGObject.ps1 | Enable-PRTGObject.ps1 | function Enable-PRTGObject {
<#
.Synopsis
Enable-PRTGObject
.DESCRIPTION
Enables an (paused) PRTG object
.NOTES
Author: Andreas Bellstedt
adopted from PSGallery Module "PSPRTG"
Author: Sam-Martin
Github: https://github.com/Sam-Martin/prtg-powers... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Disconnect-PRTGServer.ps1 | Disconnect-PRTGServer.ps1 | function Disconnect-PRTGServer {
<#
.Synopsis
Disconnect-PRTGServer
.DESCRIPTION
Clears globale variables from memory
Globale Variablen:
$global:PRTGServer
$global:PRTGUser
$global:PRTGPass
.NOTES
Author: Andreas Bellstedt
... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGProbe.ps1 | Get-PRTGProbe.ps1 | function Get-PRTGProbe {
<#
.Synopsis
Get-PRTGProbe
.DESCRIPTION
Returns one or more probes from sensortree
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Get-PRTGProbe
Query all probes from ... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Set-PRTGObjectAlamAcknowledgement.ps1 | Set-PRTGObjectAlamAcknowledgement.ps1 | function Set-PRTGObjectAlamAcknowledgement {
<#
.Synopsis
Set-PRTGObjectAlamAcknowledgement
.DESCRIPTION
Acknowledge an alarm on a PRTG object
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Set-... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Invoke-PRTGSensorTreeRefresh.ps1 | Invoke-PRTGSensorTreeRefresh.ps1 | function Invoke-PRTGSensorTreeRefresh {
<#
.Synopsis
Invoke-PRTGSensorTreeRefresh
.DESCRIPTION
Get the sensortree from prtg server and refesh the global variable PRTGSensorTree
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Invoke-PRTGObjectRefresh.ps1 | Invoke-PRTGObjectRefresh.ps1 | function Invoke-PRTGObjectRefresh {
<#
.Synopsis
Invoke-PRTGObjectRefresh
.DESCRIPTION
Enables an (paused) PRTG object
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Invoke-PRTGObjectRefresh -Object... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Find-PRTGObject.ps1 | Find-PRTGObject.ps1 | function Find-PRTGObject {
<#
.Synopsis
Find-PRTGObject
.DESCRIPTION
Find objects from sensortree by various criteria
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Find-PRTGObject -ByTAGName "Server... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Receive-PRTGObjectStatus.ps1 | Receive-PRTGObjectStatus.ps1 | Function Receive-PRTGObjectStatus {
<#
.Synopsis
Receive-PRTGObjectStatus
.DESCRIPTION
Query the status of an object directly from PRTGserver and returns.
Difference to Get-PRTGObject is, that "Get-PRTGObject" is working on a modfified sensortree variable in the memory and not o... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Rename-PRTGObject.ps1 | Rename-PRTGObject.ps1 | function Rename-PRTGObject {
<#
.Synopsis
Rename-PRTGObject
.DESCRIPTION
Rename an PRTG object
.NOTES
Author: Andreas Bellstedt
adopted from PSGallery Module "PSPRTG"
Author: Sam-Martin
Github: https://github.com/Sam-Martin/prtg-powershell
... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Remove-PRTGObjectTAG.ps1 | Remove-PRTGObjectTAG.ps1 | function Remove-PRTGObjectTAG {
<#
.Synopsis
Remove-PRTGObjectTAG
.DESCRIPTION
Remove a text from the tags property of an PRTG object
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Remove-PRTGObj... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/New-PRTGDeviceFromTemplate.ps1 | New-PRTGDeviceFromTemplate.ps1 | function New-PRTGDeviceFromTemplate {
<#
.Synopsis
New-PRTGDeviceFromTemplate
.DESCRIPTION
Creates a new device out of a template structure, where operatingsystems and operatingsystem roles are separates in different templates.
.NOTES
Author: Andreas Bellstedt
.LIN... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Receive-PRTGObjectProperty.ps1 | Receive-PRTGObjectProperty.ps1 | function Receive-PRTGObjectProperty {
<#
.Synopsis
Receive-PRTGObject
.DESCRIPTION
Query an object property directly from PRTGserver and returns.
Difference to Get-PRTGObjectProperty is, that "Get-PRTGObjectProperty" is working on a modfified sensortree variable in the memory an... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Get-PRTGSensorTree.ps1 | Get-PRTGSensorTree.ps1 | function Get-PRTGSensorTree {
<#
.Synopsis
Get-PRTGSensorTree
.DESCRIPTION
Return the current sensortree from PRTG Server
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Get-PRTGSensorTree
.EXA... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Add-PRTGObjectTAG.ps1 | Add-PRTGObjectTAG.ps1 | function Add-PRTGObjectTAG {
<#
.Synopsis
Add-PRTGObjectTAG
.DESCRIPTION
Add a text to the tags property of an PRTG object
.NOTES
Author: Andreas Bellstedt
.LINK
https://github.com/AndiBellstedt/PoShPRTG
.EXAMPLE
Add-PRTGObjectTAG -ObjectId 1... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Copy-PRTGObject.ps1 | Copy-PRTGObject.ps1 | function Copy-PRTGObject {
<#
.Synopsis
Copy-PRTGObject
.DESCRIPTION
Copy a PRTG Object
.NOTES
Author: Andreas Bellstedt
adopted from PSGallery Module "PSPRTG"
Author: Sam-Martin
Github: https://github.com/Sam-Martin/prtg-powershell
.LINK
... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Connect-PRTGServer.ps1 | Connect-PRTGServer.ps1 | function Connect-PRTGServer {
<#
.Synopsis
Connect-PRTGServer
.DESCRIPTION
Connect to PRTG Server, creates global variables with connection data and the current sensor tree from PRTG Core Server.
The global variables are used as default parameters in other PRTG-module cmdlets to... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Receive-PRTGObject.ps1 | Receive-PRTGObject.ps1 | function Receive-PRTGObject {
<#
.Synopsis
Receive-PRTGObject
.DESCRIPTION
Query an object directly from PRTGserver and returns.
Difference to Get-PRTGObject is, that "Get-PRTGObject" is working on a modfified sensortree variable in the memory and not on livedata from PRTGServer... |
PowerShellCorpus/PowerShellGallery/PoShPRTG/1.5.0.0/Functions/Disable-PRTGObject.ps1 | Disable-PRTGObject.ps1 | function Disable-PRTGObject {
<#
.Synopsis
Disable-PRTGObject
.DESCRIPTION
Pause an PRTG object
.NOTES
Author: Andreas Bellstedt
adopted from PSGallery Module "PSPRTG"
Author: Sam-Martin
Github: https://github.com/Sam-Martin/prtg-powershell
... |
PowerShellCorpus/PowerShellGallery/PSLinuxUtils/0.10/Tests/PSLinuxUtils.Tests.ps1 | PSLinuxUtils.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.", ".")
. "$here${directorySeparatorChar}$sut"
Describe "PSLinuxUtils" {
$Commands = Get-Command -Module PSLinuxUtils
It "Test required number of commands are exposed" {
... |
PowerShellCorpus/PowerShellGallery/PSLinuxUtils/0.10/Tests/PSLinuxUtils.ps1 | PSLinuxUtils.ps1 | Import-Module ../PSLinuxUtils.psd1 -Force
function PSLinuxUtils {
}
|
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Invoke-ConsoleBuild.ps1 | Invoke-ConsoleBuild.ps1 |
function Invoke-ConsoleApplication {
[CmdletBinding()]
param(
[string]$ProjectPath,
[string]$SolutionDir,
[Parameter(Mandatory)]
[ScriptBlock]$ConfigureScript
)
try {
$PathToExecutable = Invoke-MsBuild -ProjectPath $ProjectPath -SolutionDir $Solut... |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Invoke-ConfigureWebEnvironment.ps1 | Invoke-ConfigureWebEnvironment.ps1 |
function Invoke-ConfigureWebEnvironment {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[ScriptBlock]$ConfigureScript
)
if (-Not (Test-IsAdmin)) {
Write-Warning "Local Administrator privileges are required as need to add DNS entry to Hosts, exiting"
Exit 1
... |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/ConfigureEnvironment.ps1 | ConfigureEnvironment.ps1 | [CmdletBinding()]
param()
# Error handling
$ErrorActionPreference = "Stop"
trap
{
Pop-Location
$Host.UI.WriteErrorLine($_)
Exit 1
}
# Include scripts
Get-ChildItem $PSScriptRoot -Recurse -Include *.ps1 -Exclude 'ConfigureEnvironment.ps1' | %{ . $_.FullName } |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Windows/Add-DnsEntryToHostsFile.ps1 | Add-DnsEntryToHostsFile.ps1 | function Add-LocalhostDnsEntryToHostsFile {
param (
$HostName,
$WebSiteName
)
Add-DnsEntryToHostsFile -IpAddress 127.0.0.1 -HostName $HostName -Comment "Local IIS Entry for $WebSiteName"
}
function Add-DnsEntryToHostsFile {
param (
[parameter(Mandatory)][string]
... |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Windows/Set-DisableLoopbackCheck.ps1 | Set-DisableLoopbackCheck.ps1 | function Set-DisableLoopbackCheck {
Write-Host "Setting DisableLoopbackCheck so that Windows Authenication will work locally. For more information https://support.microsoft.com/en-us/kb/896861"
New-ItemProperty -Path HKLM:\System\CurrentControlSet\Control\Lsa\ -Name DisableLoopbackCheck -PropertyType DWORD -V... |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Windows/Test-IsAdmin.ps1 | Test-IsAdmin.ps1 | function Test-IsAdmin {
$Identity = [Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()
Return $Identity.IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
} |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Windows/Install-WindowsFeatureIIS.ps1 | Install-WindowsFeatureIIS.ps1 | #
# Install Internet Information Services
#
function Install-WindowsFeatureIIS {
Write-Host "Checking Internet Information Services (IIS) " -NoNewline
Write-Host "[Installing]" -ForegroundColor Yellow
Write-Host "Installing Internet Information Services (IIS) " -NoNewline
$Dism = "$Env:WinD... |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Build/Invoke-MsBuild.ps1 | Invoke-MsBuild.ps1 | function Invoke-MsBuild {
param (
[parameter(Mandatory)]
[ValidateScript({ Test-Path $_ })]
[ValidatePattern("\.csproj$")]
[string]$ProjectPath,
[parameter()][string]
$Configuration ="Release",
[parameter()][string]
$Platform = "AnyCpu",
... |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/SqlServer/Execute-SqlScript.ps1 | Execute-SqlScript.ps1 | function Execute-SqlScript {
param (
[parameter(Mandatory)][string]
$SqlInstance,
[parameter(Mandatory)][string]
$ScriptLocation
)
& sqlcmd -S "$SqlInstance" -E -i "$ScriptLocation" | %{ Write-Host "[SqlCmd $SqlInstance] $_" }
} |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Web/Add-WebSite.ps1 | Add-WebSite.ps1 | function Add-WebSite {
param (
[string]$WebSiteName,
[string]$WebSiteLocation,
[string]$HostName,
[string]$AppPool,
[switch]$UseSSL,
[string]$EnableAnonymousAuthentication,
[string]$EnableWindowsAuthentication,
[string]$UsingLocalDb
)
... |
PowerShellCorpus/PowerShellGallery/ConfigureEnvironment/0.1.2.0/Web/Add-WebApplication.ps1 | Add-WebApplication.ps1 | function Add-WebApplication {
param (
[string]$WebApplicationName,
[string]$WebApplicationLocation,
[string]$HostName,
[string]$AppPool,
[string]$ParentSite,
[string]$EnableAnonymousAuthentication,
[string]$EnableWindowsAuthentication,
[string... |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/BuildPackage.ps1 | BuildPackage.ps1 | .\tools\NuGet.exe pack posh-HumpCompletion.nuspec |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/RunPester.ps1 | RunPester.ps1 | function GetLineNumber($stackTrace){
if($stackTrace -match "at line: (\d*)"){
$matches[1];
} else {
$null
}
}
function GetFileName($stackTrace){
if($stackTrace -match "at line: (?:\d*) in (.*)\n"){
$matches[1];
} else {
$null
}
}
function FormatResult ($result){
process {
$lineNumber =... |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/posh-HumpCompletion.ps1 | posh-HumpCompletion.ps1 | $Runspace = $null
$Powershell = $null
function local:EnsureHumpCompletionCommandCache() {
if ($global:HumpCompletionCommandCache -eq $null) {
if (($script:runspace -eq $null) -or ($poshhumpLoadCommandsSync) ) {
DebugMessage -message "loading command cache"
$global:HumpCompletio... |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/DevInstall.ps1 | DevInstall.ps1 | # clean choco cache
dir $env:ProgramData\chocolatey\lib\posh-HumpCompletion* | Remove-Item -Recurse -Force
# install choco package from local dir
choco install posh-HumpCompletion -source "$pwd" -pre -force -y |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/posh-HumpCompletion.tests.ps1 | posh-HumpCompletion.tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".tests.", ".")
$global:poshhumpSkipTabCompletionInstall = $true
$global:poshhumpLoadCommandsSync = $true
. "$here\common.ps1"
. "$here\$sut"
$global:HumpCompletionCommandCache=$null #clear cac... |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/common.ps1 | common.ps1 | function DebugMessage($message) {
# $threadId = [System.Threading.Thread]::CurrentThread.ManagedThreadId
# $appDomainId = [AppDomain]::CurrentDomain.Id
# [System.Diagnostics.Debug]::WriteLine("PoshHump: $threadId : $appDomainId :$message")
[System.Diagnostics.Debug]::WriteLine("PoshHump: $message")
... |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/chocolateyInstall.ps1 | chocolateyInstall.ps1 | $packageName = 'posh-HumpCompletion'
$sourcePath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$targetPath = Join-Path ([System.Environment]::GetFolderPath("MyDocuments")) "WindowsPowerShell\Modules\posh-HumpCompletion"
if(Test-Path $targetPath){
Write-Host "Remove previous module folder"
Rem... |
PowerShellCorpus/PowerShellGallery/posh-HumpCompletion/0.4.0/chocolateyUninstall.ps1 | chocolateyUninstall.ps1 | $packageName = 'posh-HumpCompletion'
$sourcePath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$targetPath = Join-Path ([System.Environment]::GetFolderPath("MyDocuments")) "WindowsPowerShell\Modules\posh-HumpCompletion"
if(Test-Path $targetPath){
Remove-Item -Path $targetPath -Recurse -Force
}
... |
PowerShellCorpus/PowerShellGallery/Posh-IC/0.0.5/New-ICWorkgroups.ps1 | New-ICWorkgroups.ps1 | <#
# AUTHOR : Pierrick Lozach
#>
function New-ICWorkgroups() # {{{2
{
# Documentation {{{3
<#
.SYNOPSIS
Creates new IC workgroups
.DESCRIPTION
Creates new IC workgroups.
.PARAMETER ICSession
The Interaction Center Session
.PARAMETER ICWorkgroups
Hashtable of user data, including usernames and ex... |
PowerShellCorpus/PowerShellGallery/Posh-IC/0.0.5/Set-ICLicense.ps1 | Set-ICLicense.ps1 | <#
# AUTHOR : Pierrick Lozach
#>
function Set-ICLicense() # {{{2
{
# Documentation {{{3
<#
.SYNOPSIS
Assigns a CIC license to a user
.DESCRIPTION
Assigns a CIC license to a specific CIC user.
.PARAMETER ICSession
The Interaction Center Session
.PARAMETER ICUser
The Interaction Center User Identi... |
PowerShellCorpus/PowerShellGallery/Posh-IC/0.0.5/Import-AttProfile.ps1 | Import-AttProfile.ps1 | <#
# AUTHOR : Pierrick Lozach
#>
function Import-AttProfile() # {{{2
{
# Documentation {{{3
<#
.SYNOPSIS
Imports Interaction Attendant profiles
.DESCRIPTION
Imports .reg files containing Interaction Attendant profiles into the active Attendant configuration on a CIC server. Replaces the site and server ... |
PowerShellCorpus/PowerShellGallery/Posh-IC/0.0.5/Get-ICWorkgroup.ps1 | Get-ICWorkgroup.ps1 | <#
# AUTHOR : Pierrick Lozach
#>
function Get-ICWorkgroup() # {{{2
{
# Documentation {{{3
<#
.SYNOPSIS
Gets a workgroup
.DESCRIPTION
Gets a workgroup
.PARAMETER ICSession
The Interaction Center Session
.PARAMETER ICWorkgroup
The Interaction Center Workgroup
#> # }}}3
[CmdletBinding()]
Par... |
PowerShellCorpus/PowerShellGallery/Posh-IC/0.0.5/Install.ps1 | Install.ps1 | [CmdletBinding()]
Param(
[Parameter(Position=1, Mandatory=$false)]
$Path
)
$ModuleName = 'Posh-IC'
$ModuleVersion = '0.0.5'
$GithubRoot = "https://raw.githubusercontent.com/gildas/posh-ic/$ModuleVersion"
if ([string]::IsNullOrEmpty($Path))
{
$my_modules = Join-Path ([Environment]::GetFolderP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.