full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/ARTools/2016.5.7.3/Public/Test-SNMPCommunityString.ps1 | Test-SNMPCommunityString.ps1 | function Test-SNMPCommunityString
{
<#
.Synopsis
Tests SNMP community strings.
.DESCRIPTION
The Test-SNMPCommunityString function sends SNMP requests to user defined IP ranges using a user defined list of community strings and outputs their response.
... |
PowerShellCorpus/PowerShellGallery/ARTools/2016.5.7.3/Public/Start-VSDiffMerge.ps1 | Start-VSDiffMerge.ps1 | function Start-VSDiffMerge{
[cmdletbinding()]
Param(
[Parameter(Mandatory = $True,Position=0)]
[System.IO.FileInfo]$ReferenceFile,
[Parameter(Mandatory = $True,Position=1)]
[System.IO.FileInfo]$DifferenceFile
)
Begin{}
Process{
$ReferenceFile, $DifferenceFile |
ForEach-Object -Proces... |
PowerShellCorpus/PowerShellGallery/ARTools/2016.5.7.3/Public/Get-ConfigMgrAppInfo.ps1 | Get-ConfigMgrAppInfo.ps1 | #requires -Version 2
function Get-ConfigMgrAppInfo
{
[cmdletbinding()]
Param(
[Parameter(Mandatory = $True,ValueFromPipelineByPropertyName = $True)]
[Alias('LocalizedDisplayName')]
[string]$ApplicationName
)
Begin{
Push-Location
Connect-C... |
PowerShellCorpus/PowerShellGallery/ARTools/2016.5.7.3/Public/New-AudioNotification.ps1 | New-AudioNotification.ps1 | #requires -Version 2
function New-AudioNotification
{
[CmdletBinding(SupportsShouldProcess = $True,ConfirmImpact = 'Low')]
Param(
[Parameter(Mandatory = $False,ValueFromPipeline)]
[string]$Message = 'Attention. Task Completed.'
)
Begin{
$AudioControl = @'
us... |
PowerShellCorpus/PowerShellGallery/ARTools/2016.5.7.3/Public/Split-Array.ps1 | Split-Array.ps1 | #requires -Version 2
function Split-Array
{
[Cmdletbinding()]
Param(
[Parameter(Mandatory = $True)]
[object]$InputObject,
[Parameter(Mandatory = $False)]
[int]$Limit = 32
)
Begin{}
Process{
$NumberOfSegments = [Math]::Ce... |
PowerShellCorpus/PowerShellGallery/ARTools/2016.5.7.3/Diagnostics/Simple/Validate-UserInfo.tests.ps1 | Validate-UserInfo.tests.ps1 | [cmdletbinding()]
Param(
[Parameter(Mandatory = $True)]
[string]$OU,
[Parameter(Mandatory = $False)]
[string[]]$OfficesList,
[Parameter(Mandatory = $False)]
[string[]]$TitlesList,
[Parameter(Mandatory = $False)]
[string[]]$DepartmentsList
)
'TitlesLis... |
PowerShellCorpus/PowerShellGallery/VMware.VimAutomation.PCloud/6.5.1.5376282/VMware.VimAutomation.PCloud.ps1 | VMware.VimAutomation.PCloud.ps1 | [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory]::CoreService.OnImportModule(
"VMware.VimAutomation.PCloud.Commands",
(Split-Path $script:MyInvocation.MyCommand.Path));
# SIG # Begin signature block
# MIIdVgYJKoZIhvcNAQcCoIIdRzCCHUMCAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4... |
PowerShellCorpus/PowerShellGallery/xWindowsUpdate/2.6.0.0/Examples/Resources/xHotfix/1-Sample_xWindowsUpdateFromPath.ps1 | 1-Sample_xWindowsUpdateFromPath.ps1 | <#
.EXAMPLE
This sample looks at installing a particular windows update. However, the path and ID properties can be changed
as per the hotfix that you want to install
#>
Configuration Example
{
Import-DscResource -ModuleName xWindowsUpdate
xHotfix m1
{
Path = "c:\Windows... |
PowerShellCorpus/PowerShellGallery/xWindowsUpdate/2.6.0.0/Examples/Resources/xHotfix/2-Sample_xWindowsUpdateFromURI.ps1 | 2-Sample_xWindowsUpdateFromURI.ps1 | <#
.EXAMPLE
This sample looks at installing a particular windows update. However, the URI and ID properties can be changed
as per the hotfix that you want to install
#>
Configuration Example
{
Import-DscResource -module xWindowsUpdate
xHotfix m1
{
Path = 'http://hotfix... |
PowerShellCorpus/PowerShellGallery/xWindowsUpdate/2.6.0.0/Examples/Resources/xWindowsUpdateAgent/1-SetWuaScheduledFromWu.ps1 | 1-SetWuaScheduledFromWu.ps1 | <#
.EXAMPLE
Sets the Windows Update Agent to use the Windows Update service and sets
the notifications to scheduled install. Does not install updates during
the configuration.
#>
Configuration Example
{
Import-DscResource -ModuleName xWindowsUpdate
xWindowsUpdateAgent MuSecurit... |
PowerShellCorpus/PowerShellGallery/xWindowsUpdate/2.6.0.0/Examples/Resources/xMicrosoftUpdate/1-Sample_xMicrosoftUpdate.ps1 | 1-Sample_xMicrosoftUpdate.ps1 | <#
.EXAMPLE
Enables Mircosoft Update on Server1, Server2 and Server3
#>
Configuration Example
{
Import-DscResource -Module xWindowsUpdate
Node localhost
{
xMicrosoftUpdate "EnableMSUpdate"
{
Ensure = "Present"
}
}
}
|
PowerShellCorpus/PowerShellGallery/xWindowsUpdate/2.6.0.0/Tests/Unit/MSFT_xWindowsUpdateAgent.tests.ps1 | MSFT_xWindowsUpdateAgent.tests.ps1 | <#
.Synopsis
Unit tests for xWindowsUpdateAgent
.DESCRIPTION
Unit tests for xWindowsUpdateAgent
.NOTES
Code in HEADER and FOOTER regions are standard and may be moved into DSCResource.Tools in
Future and therefore should not be altered if possible.
#>
$Global:DSCModuleName = 'xWindowsUp... |
PowerShellCorpus/PowerShellGallery/xWindowsUpdate/2.6.0.0/Tests/Unit/MSFT_xWindowsUpdate.tests.ps1 | MSFT_xWindowsUpdate.tests.ps1 | <#
.SYNOPSIS
Unit tests for xWindowsUpdate
.DESCRIPTION
Unit tests for xWindowsUpdate
.NOTES
Code in HEADER and FOOTER regions are standard and may be moved into DSCResource.Tools in
Future and therefore should not be altered if possible.
#>
$Script:DSCModuleN... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/helpers/ConvertTo-TypeProjectionCriteriaXml.ps1 | ConvertTo-TypeProjectionCriteriaXml.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/helpers/Add-ClassHierarchyToTypeNameList.ps1 | Add-ClassHierarchyToTypeNameList.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/helpers/Join-CriteriaXml.ps1 | Join-CriteriaXml.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/helpers/Test-LocalComputer.ps1 | Test-LocalComputer.ps1 | <#####################################################################
These files contain scripts used to assist in troubleshooting support
issues related to the Provance 2012 IT Asset Management Pack and the
Provance 2012 Data Management Pack. Do not edit or change the contents
of these files directly.
Copyrig... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/New-ScsmPxObject.ps1 | New-ScsmPxObject.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxObjectHistory.ps1 | Get-ScsmPxObjectHistory.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Restore-ScsmPxObject.ps1 | Restore-ScsmPxObject.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Set-ScsmPxObject.ps1 | Set-ScsmPxObject.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/New-ScsmPxManagementPackBundle.ps1 | New-ScsmPxManagementPackBundle.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxDwName.ps1 | Get-ScsmPxDwName.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxListItem.ps1 | Get-ScsmPxListItem.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxCommand.ps1 | Get-ScsmPxCommand.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Reset-ScsmPxCommandCache.ps1 | Reset-ScsmPxCommandCache.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxList.ps1 | Get-ScsmPxList.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxEnterpriseManagementGroup.ps1 | Get-ScsmPxEnterpriseManagementGroup.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Add-ScsmPxFileAttachment.ps1 | Add-ScsmPxFileAttachment.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/New-ScsmPxObjectSearchCriteria.ps1 | New-ScsmPxObjectSearchCriteria.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxObject.ps1 | Get-ScsmPxObject.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxConnectedUser.ps1 | Get-ScsmPxConnectedUser.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxRelatedObject.ps1 | Get-ScsmPxRelatedObject.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxInstallDirectory.ps1 | Get-ScsmPxInstallDirectory.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/New-ScsmPxProxyFunctionDefinition.ps1 | New-ScsmPxProxyFunctionDefinition.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Remove-ScsmPxObject.ps1 | Remove-ScsmPxObject.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Add-ScsmPxTroubleTicketComment.ps1 | Add-ScsmPxTroubleTicketComment.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxViewData.ps1 | Get-ScsmPxViewData.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Rename-ScsmPxObject.ps1 | Rename-ScsmPxObject.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/functions/Get-ScsmPxPrimaryManagementServer.ps1 | Get-ScsmPxPrimaryManagementServer.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/ScsmPx/1.0.17.60/scripts/Initialize-NativeScsmEnvironment.ps1 | Initialize-NativeScsmEnvironment.ps1 | <#############################################################################
The ScsmPx module facilitates automation with Microsoft System Center Service
Manager by auto-loading the native modules that are included as part of that
product and enabling automatic discovery of the commands that are contained
within... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-NagiosXiServiceStatus.ps1 | Get-NagiosXiServiceStatus.ps1 | <#
.Synopsis
Get a list of service status from Nagios XI.
.DESCRIPTION
Get a list of service status from Nagios XI using Invoke-NagiosXiApi.
All parameters have default values, but you should change your NagiosXiApiUrl and NagiosXiApiKey to match
your environment. See the documentation for Invo... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Encrypt-Password.ps1 | Encrypt-Password.ps1 | # encrypt the credentials into a Credential object for use with Invoke-WebRequest.
Function Encrypt-Password {
param (
# Nagios username
[Parameter(Mandatory=$false,Position=0)]
[string]$username,
[Parameter(ValueFromPipeline=$true,Mandatory=$false,Position=1)]
[String... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Disable-NagiosHostNotifications.ps1 | Disable-NagiosHostNotifications.ps1 | <#
.Synopsis
Disables Nagios Host notifications for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to disable nagios notifications for a specified host.
.EXAMPLE
Disable-NagiosHostNotifications -ComputerName SERVER01
.EXAMPLE
Disable-NagiosHos... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Enable-NagiosHostChecks.ps1 | Enable-NagiosHostChecks.ps1 | <#
.Synopsis
Enables Nagios Host checks for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to enable nagios checks for a specified host.
.EXAMPLE
Enable-NagiosHostChecks -ComputerName SERVER01
.EXAMPLE
Enable-NagiosHostChecks -ComputerName SER... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Submit-NagiosHostAcknowledgement.ps1 | Submit-NagiosHostAcknowledgement.ps1 | <#
.Synopsis
Acknowledge Nagios Host problem for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to acknowledge nagios host problem for a specified host.
.EXAMPLE
Submit-NagiosHostAcknowledgement -ComputerName SERVER01
.EXAMPLE
Submit-NagiosHos... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Enable-NagiosHostGroupChecks.ps1 | Enable-NagiosHostGroupChecks.ps1 | <#
.Synopsis
Enables Nagios Host checks for a specified hostgroup.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to enable nagios checks for a specified hostgroup.
.EXAMPLE
Enable-NagiosHostGroupChecks -HostGroup HostgroupName
.EXAMPLE
Enable-NagiosHostGrouptC... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Invoke-NagiosRequest.ps1 | Invoke-NagiosRequest.ps1 | <#
.Synopsis
This script allows the user execute cgi commands to a Nagios site by using
the Invoke-WebRequest cmdlet.
.DESCRIPTION
The purpose of the script is to automate the process of disabling/enabling
nagios notifications and/or checks for Nagios hosts and their services.
The script uti... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-UserLogin.ps1 | Get-UserLogin.ps1 | Function Get-UserLogin {
param (
# Nagios username
[Parameter(Mandatory=$false,Position=0)]
[string]$username,
# Nagios password
[Parameter(Mandatory=$false,Position=1)]
[string]$Password
)
begin {}
process {
# Verifying if a u... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Disable-NagiosHostGroupChecks.ps1 | Disable-NagiosHostGroupChecks.ps1 | <#
.Synopsis
Disables Nagios Host checks for a specified hostgroup.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to disable nagios checks for a specified hostgroup.
.EXAMPLE
Disable-NagiosHostGroupChecks -HostGroup HostgroupName
.EXAMPLE
Disable-NagiosHostGro... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Enable-NagiosGlobalNotifications.ps1 | Enable-NagiosGlobalNotifications.ps1 | <#
.Synopsis
Enables Nagios global notifications.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to enable nagios global notifications.
.EXAMPLE
Enable-NagiosGlobalNotifications
.EXAMPLE
Enable-NagiosGlobalNotifications -username jdoe
.EXAMPLE
Enable-Nagi... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-NagiosXiAllServiceProblems.ps1 | Get-NagiosXiAllServiceProblems.ps1 | <#
.Synopsis
Get a list of all service problems from Nagios XI.
.DESCRIPTION
Get a list of all service problems from Nagios XI using Invoke-NagiosXiApi.
All service problems are services in Nagios that are warning, critical, or unknown.
All parameters have default values, but you should change your ... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Submit-NagiosXiOpenHostProblemsAcknowledgement.ps1 | Submit-NagiosXiOpenHostProblemsAcknowledgement.ps1 | <#
.Synopsis
Acknowldge all open host problems in Nagios XI.
.DESCRIPTION
Get a list of open host problems from Nagios XI using Invoke-NagiosXiApi and then
acknowledge each of them.
Open service problems are services in Nagios that are warning, critical, or unknown and that
have not been ackno... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Enable-NagiosServiceGroupChecks.ps1 | Enable-NagiosServiceGroupChecks.ps1 | <#
.Synopsis
Enables Nagios services checks for a specified servicegroup.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to enable nagios checks for a specified servicegroup.
.EXAMPLE
Enable-NagiosServiceGroupChecks -ServiceGroup ServiceGroupName
.EXAMPLE
Enabl... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-NagiosXiOpenHostProblems.ps1 | Get-NagiosXiOpenHostProblems.ps1 | <#
.Synopsis
Get a list of open host problems from Nagios XI.
.DESCRIPTION
Get a list of open host problems from Nagios XI using Invoke-NagiosXiApi.
All host problems are hosts in Nagios that are down, unreachable, or unknown.
All parameters have default values, but you should change your NagiosXiAp... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-NagiosXiOpenServiceProblems.ps1 | Get-NagiosXiOpenServiceProblems.ps1 | <#
.Synopsis
Get a list of open service problems for from Nagios XI.
.DESCRIPTION
Get a list of open service problems from Nagios XI using Invoke-NagiosXiApi.
Open service problems are services in Nagios that are warning, critical, or unknown and that
have not been acknowledged on all servers includi... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Enable-NagiosHostNotifications.ps1 | Enable-NagiosHostNotifications.ps1 | <#
.Synopsis
Enables Nagios Host notifications for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to enable nagios notifications for a specified host.
.EXAMPLE
Enable-NagiosHostNotifications -ComputerName SERVER01
.EXAMPLE
Enable-NagiosHostNot... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Disable-NagiosHostChecks.ps1 | Disable-NagiosHostChecks.ps1 | <#
.Synopsis
Disables Nagios Host checks for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to disable nagios checks for a specified host.
.EXAMPLE
Disable-NagiosHostChecks -ComputerName SERVER01
.EXAMPLE
Disable-NagiosHostChecks -ComputerName... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Enable-NagiosServiceNotifications.ps1 | Enable-NagiosServiceNotifications.ps1 | <#
.Synopsis
Enables Nagios service notifications for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to enable nagios notifications for a specified service on a host.
.EXAMPLE
Enable-NagiosServiceNotifications -ComputerName SERVER01 -Service sqlser... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Submit-NagiosXiOpenServiceProblemsAcknowledgement.ps1 | Submit-NagiosXiOpenServiceProblemsAcknowledgement.ps1 | <#
.Synopsis
Acknowledge all open service problems in Nagios XI.
.DESCRIPTION
Get a list of open service problems from Nagios XI using Invoke-NagiosXiApi and then
acknowledge each of them.
Open service problems are services in Nagios that are warning, critical, or unknown and that
have not bee... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Disable-NagiosServiceNotifications.ps1 | Disable-NagiosServiceNotifications.ps1 | <#
.Synopsis
Disables Nagios service notifications for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to disable nagios notifications for a specified service on a host.
.EXAMPLE
Disable-NagiosServiceNotifications -ComputerName SERVER01 -Service sql... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-NagiosXiAllOpenServiceProblems.ps1 | Get-NagiosXiAllOpenServiceProblems.ps1 | <#
.Synopsis
Get a list of all open service problems from Nagios XI.
.DESCRIPTION
Get a list of all open service problems from Nagios XI using Invoke-NagiosXiApi.
All open service problems are services in Nagios that are warning, critical, or unknown and that
have not been acknowledged on all servers... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-NagiosXiHostStatus.ps1 | Get-NagiosXiHostStatus.ps1 | <#
.Synopsis
Get a list of host status from Nagios XI.
.DESCRIPTION
Get a list of host status from Nagios XI using Invoke-NagiosXiApi.
All parameters have default values, but you should change your NagiosXiApiUrl and NagiosXiApiKey to match
your environment. See the documentation for Invoke-Nag... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Disable-NagiosServiceGroupChecks.ps1 | Disable-NagiosServiceGroupChecks.ps1 | <#
.Synopsis
Disables Nagios services checks for a specified servicegroup.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to disable nagios checks for a specified servicegroup.
.EXAMPLE
Disable-NagiosServiceGroupChecks -ServiceGroup ServiceGroupName
.EXAMPLE
Di... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Submit-NagiosServiceAcknowledgement.ps1 | Submit-NagiosServiceAcknowledgement.ps1 | <#
.Synopsis
Acknowledge Nagios service problem for a specified host.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to acknowledge nagios service problem for a specified host.
.EXAMPLE
Submit-NagiosServiceAcknowledgement -ComputerName SERVER01 -service Uptime
.EXA... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Invoke-NagiosXiApi.ps1 | Invoke-NagiosXiApi.ps1 | <#
.Synopsis
Invoke-NagiosXiApi is a wrapper script for interacting with the Nagios XI
REST API.
.DESCRIPTION
Invoke-NagiosXiApi is a wrapper script for interacting with the Nagios XI
REST API. With the Nagios XI API you can get a host and service status as
well as a number of other data. If you... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Resolve-NagiosXiStoppedServices.ps1 | Resolve-NagiosXiStoppedServices.ps1 | <#
.Synopsis
Execute the Start-StoppedAutomaticService script against all open Automatic Windows Services
service problems in Nagios XI.
.DESCRIPTION
Using the Nagios XI API we can get a list of all open service problems. We can filter this list
of open service problems for Windows automatic services ... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Get-NagiosXiAllHostProblems.ps1 | Get-NagiosXiAllHostProblems.ps1 | <#
.Synopsis
Get a list of all host problems from Nagios XI.
.DESCRIPTION
Get a list of all host problems from Nagios XI using Invoke-NagiosXiApi.
All host problems are hosts in Nagios that are down, unreachable, or unknown.
All parameters have default values, but you should change your NagiosXiApiU... |
PowerShellCorpus/PowerShellGallery/MrANagios/1.2/Disable-NagiosGlobalNotifications.ps1 | Disable-NagiosGlobalNotifications.ps1 | <#
.Synopsis
Disables Nagios global notifications.
.DESCRIPTION
This function is a shortcut to Invoke-Nagios to automatically choose
to disable nagios global notifications.
.EXAMPLE
Disable-NagiosGlobalNotifications
.EXAMPLE
Disable-NagiosGlobalNotifications -username jdoe
.EXAMPLE
Disable... |
PowerShellCorpus/PowerShellGallery/GW2DailyAchievement/2.0.1.0/Tests/GW2DailyAchievement.Tests.ps1 | GW2DailyAchievement.Tests.ps1 | Import-Module $PSScriptRoot\..\GW2DailyAchievement -Force
Describe 'GW2DailyAchievement Tests' {
Context 'Get-GW2DailyAchievement Tests' {
It 'No custom parameters' {
Get-GW2DailyAchievement | Should Not BeNullOrEmpty
}
It 'Custom parameter Tomorrow' {
... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Progression/4-SmbShareWS8-Real.ps1 | 4-SmbShareWS8-Real.ps1 | # But actual creating a share in Idempotent way would be
$shareExists = $false
$smbShare = Get-SmbShare -Name $Name -ErrorAction SilentlyContinue
if($smbShare -ne $null)
{
Write-Verbose -Message "Share with name $Name exists"
$shareExists = $true
}
if ($shareExists -eq $false)
{
Write-Verbose ... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Progression/3-SmbShareWS8.ps1 | 3-SmbShareWS8.ps1 | # Create a share in Windows Server 8
New-SmbShare -Name MyShare -Path C:\Demo\Temp -FullAccess ianlucas -ReadAccess jsnover
|
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Progression/1-VBScript Share.vbs.ps1 | 1-VBScript Share.vbs.ps1 | '==========================================================================
'ShareSetup.vbs
'==========================================================================
Option Explicit
Const FILE_SHARE = 0
Const MAXIMUM_CONNECTIONS = 25
Dim strComputer
Dim objWMIService
Dim objNewShare
strComputer = "."
Set... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Progression/2-SmbShareWin7.ps1 | 2-SmbShareWin7.ps1 | # In Windows 7, it required a combination of PowerShell, WMI, and .NET
$share = [WmiClass] 'Win32_Share'
$dir = "c:\temp"
$share.Create($dir, "a1share", 0)
$share = Get-WmiObject Win32_Share -Filter "Name=`"a1share`""
$user = New-Object System.Security.Principal.NTAccount("ianlucas")
$SID = $user.Translate([Syst... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Progression/5-SmbShareDSC.ps1 | 5-SmbShareDSC.ps1 | Configuration Sample_ChangeDescriptionAndPermissions
{
Import-DscResource -Module xSmbShare
# A Configuration block can have zero or more Node blocks
Node $NodeName
{
# Next, specify one or more resource blocks
xSmbShare MySMBShare
{
Ensure = "Present"
... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Progression/Backup/DSCSharepointService.ps1 | DSCSharepointService.ps1 | configuration SharepointService
{
Service Started
{
Name = “Spooler”,“AudioSrv”, "TabletInputService"
State = "Stopped"
StartupType = "Manual“
}
Service Stopped
{
Name = "WerSvc"
State = "Stopped"
StartupType = "... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Progression/Backup/SharePointService.ps1 | SharePointService.ps1 | Function DisableServices([xml]$xmlinput)
{
If ($xmlinput.Configuration.Install.Disable.UnusedServices -eq $true)
{
WriteLine
Write-Host -ForegroundColor White " - Setting services Spooler, AudioSrv and TabletInputService to Manual..."
$servicesToSetManual = "Spooler","AudioSrv",... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Configuration.Website.1.ps1 | Configuration.Website.1.ps1 | Configuration FourthCoffeeWebsite
{
# Import the module that defines custom resources
Import-DscResource -Module xWebAdministration
Node 'Nana-Test-1'
{
# Install the IIS role
WindowsFeature IIS
{
Ensure = 'Present'
Name ... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Publishing.ps1 | Publishing.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# Let us look at properties of a module in the gallery
Find-Module xWebAdministration | Format-List * -Force
# Some of these fields are always populated from the
# module manifest, some can be specified from the
# command ... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/0-CommonInit.ps1 | 0-CommonInit.ps1 | #region Initialization
# test machine name
$NodeName = 'Nana-Test-1'
# path where compiled configurations (.mof files) need to be placed
$OutputPath = 'D:\Nana\Test\CompiledConfigurations'
# source location of fourthcoffee files
$SourcePath = 'C:\Content\content\BakeryWebsite'
# temporary location ... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/WritePesterTest.ps1 | WritePesterTest.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# Create a new test fixture in pester
New-Fixture -Path "$($ResourcePath)\Tests" -Name nService -Verbose
# it creates a script file and the corresponding test file
psedit "$($ResourcePath)\Tests\nService.ps1"
psedit "$($R... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/CreateWebsite.ps1 | CreateWebsite.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# discover if there are required resources
Find-DscResource xWebsite
# get the module
Install-Module xWebAdministration -Verbose
# now start writing a configuration
psedit "$ScriptPath\Configuration.Website.1.ps1"
# ... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/ScriptAnalyzer.ps1 | ScriptAnalyzer.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# Look for the latest version of script analyzer
Find-Module -Name *scriptAnalyzer* -Verbose -OutVariable SAModule
# It is currently developed as open source
$SAModule.ProjectUri
# Install the module
Install-Module PSScr... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Configuration.Website.2.ps1 | Configuration.Website.2.ps1 | <#
write help here
#>
Configuration FourthCoffeeWebsite
{
param
(
# Target nodes to apply the configuration
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String[]]$NodeName,
# Name of the website to create
[Parameter(Mandatory)]
[Vali... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Configuration.Service.2.ps1 | Configuration.Service.2.ps1 | Configuration MyServices
{
param
(
# Target nodes to apply the configuration
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[String[]]$NodeName
)
# Import the module that defines custom resources
Import-DscResource -Module xNetworking, PSDesiredStat... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/WriteResource_Mof.ps1 | WriteResource_Mof.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# Develop resources using xDSCResourceDesigner
# This provides a way to model the resources
# using PowerShell cmdlets
Find-Module -Name xDSCResourceDesigner
Install-Module -Name xDSCResourceDesigner -Verbose
# First m... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/WriteResource_Class.ps1 | WriteResource_Class.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# resources can also be written using classes
$Module = Get-Module -ListAvailable 'nServiceManager'
psedit "$($Module.ModuleBase)\nService.psm1"
# the .psm1 file containing the class code needs
# to be placed as the rootmod... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Invoke-MyServices.ps1 | Invoke-MyServices.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
#region Compile configuration
. "$ScriptPath\Configuration.Service.2.ps1"
# Create the MOF file using configuration parameters
MyServices -NodeName $NodeName `
-OutputPath $OutputPath
#endregion Compile conf... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Invoke-Website.ps1 | Invoke-Website.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
#region Compile configuration
. "$ScriptPath\Configuration.Website.2.ps1"
# Create the MOF file using configuration parameters
FourthCoffeeWebSite -NodeName $NodeName `
-WebSiteName 'FourthC... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Gallery.ps1 | Gallery.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# can simply find modules out of the box using Find-Module
Find-Module -OutVariable Modules
# modules are tagged
$Modules | Format-Table Name, Version, Tags -AutoSize
# can find modules based on tags
# you can add you... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/Configuration.Service.1.ps1 | Configuration.Service.1.ps1 | Configuration MyServices
{
# Import the module that defines custom resources
Import-DscResource -Module xNetworking, PSDesiredStateConfiguration
Node 'Nana-Test-1'
{
# Ensure remote desktop is turned off
Service TermService
{
Name = 'TermService'... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/SimpleClass.ps1 | SimpleClass.ps1 | class foo
{
[ValidateSet('Hungry', 'Happy', 'Amazing')]
[string] $IAm
WriteIAm()
{
#$this.IAm
Write-Host $this.IAm
}
}
$f = [foo]::new()
$f.IAm = 'Amazing'
$f.WriteIAm() |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Demo/MyServices.ps1 | MyServices.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# discover if there are required resources
Find-DscResource -Name xFirewall
# get the module
Install-Module xNetworking -Verbose -Force
# now start writing a configuration
psedit "$ScriptPath\Configuration.Service.1.ps1"... |
PowerShellCorpus/PowerShellGallery/nDemos_BRK4452/1.0/Content/CreateWebsite.ps1 | CreateWebsite.ps1 | $ScriptPath = Split-Path $MyInvocation.MyCommand.Path
. "$ScriptPath\0-CommonInit.ps1"
# discover if there are required resources
Find-Module -DscResource xWebsite
# get the module
Install-Module xWebAdministration -Verbose -Force
# now start writing a configuration
psedit "$ScriptPath\Configuration.Websit... |
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Set-WikiInfo.ps1 | Set-WikiInfo.ps1 | function Set-WikiInfo {
<#
.SYNOPSIS
Gather URI/auth info for use in this session's REST API requests.
.DESCRIPTION
Unless allowing anonymous access to your instance, credentials are needed.
Confluence REST API supports passing basic authentication in headers.
(If you have a better suggesti... |
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/New-WikiSpace.ps1 | New-WikiSpace.ps1 | function New-WikiSpace {
<#
.SYNOPSIS
Create a new blank space in your Confluence instance.
.DESCRIPTION
Create a new blank space. Key and Name mandatory, Description recommended.
.EXAMPLE
New-WikiSpace -Key 'TEST' -Name 'Test Space'
Create the new blank space. Runs Set-WikiInfo first ... |
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Remove-WikiLabel.ps1 | Remove-WikiLabel.ps1 | function Remove-WikiLabel {
<#
.SYNOPSIS
Remove a label from existing Confluence content.
.DESCRIPTION
Remove a single label from Confluence content.
Does accept multiple pages piped via Get-WikiPage.
Specifically tested against pages, but should work against all content IDs.
.EXAMPLE
... |
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Set-WikiPage.ps1 | Set-WikiPage.ps1 | function Set-WikiPage {
<#
.SYNOPSIS
Edit an existing Confluence page.
.DESCRIPTION
For existing page(s): Edit page content, page title, and/or change parent page.
Content needs to be in "Confluence storage format." Use -Convert if not preconditioned.
.EXAMPLE
Get-WikiPage -Title 'My F... |
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Remove-WikiSpace.ps1 | Remove-WikiSpace.ps1 | function Remove-WikiSpace {
<#
.SYNOPSIS
Remove an existing Confluence space.
.DESCRIPTION
Delete an existing Confluence space, including child content.
"The space is deleted in a long running task, so the space cannot be considered deleted when this resource returns."
.EXAMPLE
Remove-... |
PowerShellCorpus/PowerShellGallery/ConfluencePS/1.0.69/Public/Get-WikiPage.ps1 | Get-WikiPage.ps1 | function Get-WikiPage {
<#
.SYNOPSIS
Retrieve a listing of pages in your Confluence instance.
.DESCRIPTION
Fetch Confluence pages, optionally filtering by Name/Space/ID.
Piped output into other cmdlets is generally tested and supported.
.EXAMPLE
Get-WikiPage -Title Confluence -Limit 10... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.