full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Pushbullet/Send-PushbulletMessage.ps1
Send-PushbulletMessage.ps1
Function Send-PushbulletMessage { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [hashtable]$PushbulletNotificationSink, [string]$Subject, [string]$Body, [bool]$Critical ) $finalMessageBody = @{ device_iden = $PushbulletNot...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Pushbullet/New-PushbulletRepairMessageSubject.ps1
New-PushbulletRepairMessageSubject.ps1
Function New-PushbulletRepairMessageSubject { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [object[]]$RepairOutputValues ) return "[PoShMon $($PoShMonConfiguration.General.EnvironmentName) Repair Results]`r`n" }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Pushbullet/New-PushbulletExceptionSubject.ps1
New-PushbulletExceptionSubject.ps1
Function New-PushbulletExceptionSubject { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [ValidateSet("Monitoring", "Repairing")] [string]$Action = "Monitoring" ) return "[PoshMon $($PoShMonConfiguration.General.EnvironmentName) $Action]`r`n" }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Pushbullet/New-PushbulletMessageBody.ps1
New-PushbulletMessageBody.ps1
Function New-PushbulletMessageBody { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [ValidateSet("All","OnlyOnFailure","None")][string]$SendNotificationsWhen, [System.Collections.ArrayList]$TestOutputValues, [TimeSpan]$TotalElapsedTime ) $messageBod...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Get-OSTestNames.ps1
Get-OSTestNames.ps1
Function Get-OSTestNames { [CmdletBinding()] Param( ) $tests = Get-OSTests return "'" + [system.String]::Join("','", $tests) + "'" #formatted easily for use in TestsToSkip }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Get-OSMerges.ps1
Get-OSMerges.ps1
Function Get-OSMerges { [CmdletBinding()] Param( ) $tests = [string[]]@( "WinOSTests" ) return $tests }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Test-ServiceStatePartial.ps1
Test-ServiceStatePartial.ps1
Function Test-ServiceStatePartial { [CmdletBinding()] param ( [string]$ServerName, [string[]]$Services, [string]$ServiceState = "Running" ) $NoIssuesFound = $true $serviceFoundOnServer = Get-Service -ComputerName $ServerName $itemOutputValues = @() ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Invoke-OSMonitoring.ps1
Invoke-OSMonitoring.ps1
Function Invoke-OSMonitoring { [CmdletBinding()] Param( [parameter(Mandatory=$true, HelpMessage="A PoShMonConfiguration instance - use New-PoShMonConfiguration to create it")] [hashtable]$PoShMonConfiguration ) $outputValues = Invoke-MonitoringCore ` -Po...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Test-EventLogs.ps1
Test-EventLogs.ps1
Function Test-EventLogs { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) $allTestsOutput = @() foreach ($SeverityCode in $PoShMonConfiguration.OperatingSystem.EventLogCodes) { $mainOutput = Get-InitialOutputWithTimer -SectionHeader "$SeverityCode Eve...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Test-ServiceState.ps1
Test-ServiceState.ps1
Function Test-ServiceState { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) if ($PoShMonConfiguration.OperatingSystem -eq $null) { throw "'OperatingSystem' configuration not set properly on PoShMonConfiguration parameter." } #if ($PoShMonConfiguration.OperatingSystem.W...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Test-ComputerTime.ps1
Test-ComputerTime.ps1
Function Test-ComputerTime { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) #if ($PoShMonConfiguration.OperatingSystem -eq $null) { throw "'OperatingSystem' configuration not set properly on PoShMonConfiguration parameter." } $mainOutput = Get-InitialOutputWithTimer ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Get-GroupedEventLogItemsBySeverity.ps1
Get-GroupedEventLogItemsBySeverity.ps1
Function Get-GroupedEventLogItemsBySeverity { param ( [string]$ComputerName, [string]$SeverityCode = "Warning", $WmiStartDate ) $events = Get-WmiObject win32_NTLogEvent -ComputerName $ComputerName -filter "(logfile='Application') AND (Type ='$severityCode') And TimeGenerated ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Get-OSTests.ps1
Get-OSTests.ps1
Function Get-OSTests { [CmdletBinding()] Param( ) $tests = [string[]]@( "EventLogs", "CPULoad", "Memory", "DriveSpace", "ComputerTime", "ServiceState" ) return $tests }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Merge-WinOSTests.ps1
Merge-WinOSTests.ps1
Function Merge-WinOSTests { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$TestOutputValues ) $mergableOutputValues = $TestOutputValues | Where SectionHeader -In "Server CPU Load Review", "Memory Review", "Server Clock Review" if ($...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Test-CPULoad.ps1
Test-CPULoad.ps1
Function Test-CPULoad { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) if ($PoShMonConfiguration.OperatingSystem -eq $null) { throw "'OperatingSystem' configuration not set properly on PoShMonConfiguration parameter." } $mainOutput = Get-InitialOutputWithTimer -Secti...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Test-Memory.ps1
Test-Memory.ps1
Function Test-Memory { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) if ($PoShMonConfiguration.OperatingSystem -eq $null) { throw "'OperatingSystem' configuration not set properly on PoShMonConfiguration parameter." } $mainOutput = Get-InitialOutputWithTimer -Sectio...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.OS/Test-DriveSpace.ps1
Test-DriveSpace.ps1
Function Test-DriveSpace { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) if ($PoShMonConfiguration.OperatingSystem -eq $null) { throw "'OperatingSystem' configuration not set properly on PoShMonConfiguration parameter." } $mainOutput = Get-InitialOutputWithTimer -Se...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Core/Initialize-Notifications.ps1
Initialize-Notifications.ps1
Function Initialize-Notifications { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$TestOutputValues, [TimeSpan]$TotalElapsedTime ) if ($TestOutputValues.Count -gt 0) # it could be zero if an exception occurred prior to even run...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Core/Send-MonitoringNotifications.ps1
Send-MonitoringNotifications.ps1
Function Send-MonitoringNotifications { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [object[]]$NotificationSinks, [ValidateSet("All","OnlyOnFailure","None")][string]$SendNotificationsWhen, [System.Collections.ArrayList]$TestOutputValues, [TimeSpan]$...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Core/Send-ExceptionNotifications.ps1
Send-ExceptionNotifications.ps1
Function Send-ExceptionNotifications { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [System.Exception]$Exception, [ValidateSet("Monitoring", "Repairing")] [string]$Action = "Monitoring" ) $bodyAction = if ($Action -eq "Monitoring") { "monitor" } e...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Core/Initialize-RepairNotifications.ps1
Initialize-RepairNotifications.ps1
Function Initialize-RepairNotifications { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [object[]]$RepairOutputValues ) if ($RepairOutputValues.Count -gt 0) { if ($PoShMonConfiguration["Notifications"].Count -gt 0) { foreach ($con...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Core/Send-RepairNotifications.ps1
Send-RepairNotifications.ps1
Function Send-RepairNotifications { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [object[]]$NotificationSinks, [object[]]$RepairOutputValues ) foreach ($notificationSink in $NotificationSinks) { if ($notificationSink.TypeName -eq 'PoShMon.Con...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Shared/Send-PoShMonEmail.ps1
Send-PoShMonEmail.ps1
Function Send-PoShMonEmail { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [hashtable]$EmailNotificationSink, [string]$Subject, [string]$Body, [bool]$Critical = $false ) Write-Verbose $Body $priority = if ($Critical) { [System.Net.M...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.SelfHealing.Core/Invoke-Repairs.ps1
Invoke-Repairs.ps1
Function Invoke-Repairs { [CmdletBinding()] Param( [string[]]$RepairScripts, [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$PoShMonOutputValues ) Begin { $outputValues = @() } Process { foreach ($repairScript in ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.SelfHealing.Core/Repair-Environment.ps1
Repair-Environment.ps1
Function Repair-Environment { [CmdletBinding()] Param( [hashtable]$poShMonConfiguration, [System.Collections.ArrayList]$PoShMonOutputValues, [string[]]$RepairScripts ) #$commands = Add-Scripts $RepairScripts try { $repairOutput = Invoke-Repairs $RepairSc...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.SelfHealing.Core/Sample-Repair-WindowsServiceState.ps1
Sample-Repair-WindowsServiceState.ps1
<# #> Function Repair-WindowsServiceState { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$PoShMonOutputValues ) $stoppedServices = $PoShMonOutputValues | Where { $_.SectionHeader -EQ "Windows Service State" -and $_.NoIssuesFoun...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Exceptions/New-EmailExceptionSubject.ps1
New-EmailExceptionSubject.ps1
Function New-EmailExceptionSubject { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [ValidateSet("Monitoring", "Repairing")] [string]$Action = "Monitoring" ) return "[PoshMon] $($PoShMonConfiguration.General.EnvironmentName) $Action - Exception Occurred" }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Exceptions/New-EmailExceptionBody.ps1
New-EmailExceptionBody.ps1
Function New-EmailExceptionBody { [CmdletBinding()] Param( [System.Exception]$Exception, [string]$Action = "monitor" ) $emailBody = "" $emailBody += "An exception occurred while trying to $Action the environment.`r`n" $emailBody += "Details: $($Exception.ToString())" ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Web/Test-WebSites.ps1
Test-WebSites.ps1
Function Test-WebSites { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) $allTestsOutput = @() foreach ($websiteDetailKey in $PoShMonConfiguration.WebSite.WebsiteDetails.Keys) { $siteUrl = $websiteDetailKey $textToLocate = $PoShMonConfiguration....
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Web/Invoke-RemoteWebRequest.ps1
Invoke-RemoteWebRequest.ps1
Function Invoke-RemoteWebRequest { [CmdletBinding()] param ( [string]$SiteUrl, [string]$ServerName, [string]$ConfigurationName ) Write-Verbose "Connecting to $ServerName..." try { $remoteSession = New-PSSession -ComputerName $ServerName -ConfigurationNam...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Get-InitialOutputWithTimer.ps1
Get-InitialOutputWithTimer.ps1
Function Get-InitialOutputWithTimer { [CmdletBinding()] param ( [string]$SectionHeader, [string]$GroupBy = $null, [System.Collections.Specialized.OrderedDictionary]$OutputHeaders, [string]$HeaderUrl = $null, [string]$LinkColumn = $null ) $initialOutput...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Invoke-Tests.ps1
Invoke-Tests.ps1
Function Invoke-Tests { [CmdletBinding()] Param( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [string[]]$TestToRuns, [hashtable]$PoShMonConfiguration ) Begin { $outputValues = New-Object System.Col...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Complete-TimedOutput.ps1
Complete-TimedOutput.ps1
Function Complete-TimedOutput { [CmdletBinding()] param( [Hashtable]$TestOutputValues ) $TestOutputValues.StopWatch.Stop() $TestOutputValues.ElapsedTime = $TestOutputValues.StopWatch.Elapsed $TestOutputValues.Remove("StopWatch") $issuesFound = if ($TestOutputValues.N...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Get-InitialOutput.ps1
Get-InitialOutput.ps1
Function Get-InitialOutput { [CmdletBinding()] param ( [string]$SectionHeader, [string]$GroupBy = $null, [System.Collections.Specialized.OrderedDictionary]$OutputHeaders, [string]$HeaderUrl = $null, [string]$LinkColumn = $null ) Write-Verbose "Initiating...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Optimize-Output.ps1
Optimize-Output.ps1
Function Optimize-Output { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$TestOutputValues, [string[]]$OutputOptimizationList ) Write-Verbose "Optimizing Output..." foreach ($optimizationFunction in $OutputOptimizationL...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Invoke-MonitoringCore.ps1
Invoke-MonitoringCore.ps1
Function Invoke-MonitoringCore { [CmdletBinding()] Param( [parameter(Mandatory=$true)] [hashtable]$PoShMonConfiguration, [parameter(Mandatory=$true)] [string[]]$TestList, [Parameter(HelpMessage="In the case of a Farm product, such as SharePoint, provide a function...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Invoke-Merges.ps1
Invoke-Merges.ps1
Function Invoke-Merges { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$TestOutputValues, [string[]]$MergesToRuns ) Begin { } Process { foreach ($merge in $MergesToRuns) { #t...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Confirm-NoIssuesFound.ps1
Confirm-NoIssuesFound.ps1
Function Confirm-NoIssuesFound { [CmdletBinding()] param( $TestOutputValues ) $NoIssuesFound = $true foreach ($testOutputValue in $testOutputValues) { $NoIssuesFound = $NoIssuesFound -and $testOutputValue.NoIssuesFound if ($testOutputValue.NoIssuesFound -e...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Compare-SkippedTestsToActual.ps1
Compare-SkippedTestsToActual.ps1
Function Compare-SkippedTestsToActual { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [string[]]$TestList ) if (($PoShMonConfiguration.General.TestsToSkip -join '') -eq '') { $PoShMonConfiguration.General.TestsToSkip = @() } foreach ($skippedTest in ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.Core/Remove-SkippedTests.ps1
Remove-SkippedTests.ps1
Function Remove-SkippedTests { [CmdletBinding()] Param( [Parameter(Position=0, Mandatory=$true, ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [string[]]$AllTests, [hashtable]$PoShMonConfiguration ) Begin { $tests = [string[]]@() } ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Monitoring/New-EmailSubject.ps1
New-EmailSubject.ps1
Function New-EmailSubject { [CmdletBinding()] param( [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$TestOutputValues ) $issueCount = 0 foreach ($outputValue in $TestOutputValues) { if (($outputValue.NoIssuesFound -eq $false)) { $issue...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Monitoring/New-EmailHeader.ps1
New-EmailHeader.ps1
Function New-EmailHeader { [CmdletBinding()] param( [hashtable]$PoShMonConfiguration ) $emailSection = '' $emailSection += '<head><title>' + $ReportTitle + '</title></head>' $emailSection += '<body style="font-family: verdana; font-size: 12px;">' $emailSection += '<table w...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Monitoring/New-OutputHeadersEmailBody.ps1
New-OutputHeadersEmailBody.ps1
Function New-OutputHeadersEmailBody { [cmdletbinding()] param( $outputHeaders ) $emailBody = '' foreach ($headerKey in $outputHeaders.Keys) { $header = $outputHeaders[$headerKey] $emailBody += '<th align="left" style="border: 1px solid #CCCCCC; background-co...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Monitoring/New-EmailBody.ps1
New-EmailBody.ps1
Function New-EmailBody { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [ValidateSet("All","OnlyOnFailure","None")][string]$SendNotificationsWhen, [System.Collections.ArrayList]$TestOutputValues, [TimeSpan]$TotalElapsedTime ) $emailBody = '' ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Monitoring/New-OutputValuesEmailBody.ps1
New-OutputValuesEmailBody.ps1
Function New-OutputValuesEmailBody { [cmdletbinding()] param( $outputHeaders, $outputValues, $LinkColumn = $null ) $emailSection = '' Add-Type -AssemblyName System.Web $counter = 0 foreach ($outputValue in $outputValues) { $rowStyl...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Monitoring/New-TestOutputEmailBody.ps1
New-TestOutputEmailBody.ps1
Function New-TestOutputEmailBody { [cmdletbinding()] param( $Output ) $emailSection = '' $title = $output.SectionHeader if ($output.ContainsKey("ElapsedTime")) { $title += $(" ({0:F2} Seconds)" -f $output["ElapsedTime"].TotalSeconds) } #$emailSection += "<p><h...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Monitoring/New-EmailFooter.ps1
New-EmailFooter.ps1
Function New-EmailFooter { [CmdletBinding()] param( [hashtable]$PoShMonConfiguration, [TimeSpan]$TotalElapsedTime ) $emailSection = '' $emailSection += '</td><td style="background-color: lightgray">&nbsp;</td></tr>' #end main body $emailSection += '<tr><td style="b...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-SPDistributedCacheHealth.ps1
Test-SPDistributedCacheHealth.ps1
Function Test-SPDistributedCacheHealth { [CmdletBinding()] param ( #[System.Management.Automation.Runspaces.PSSession]$RemoteSession [hashtable]$PoShMonConfiguration ) $mainOutput = Get-InitialOutputWithTimer -SectionHeader "Distributed Cache Status" -OutputHeaders ([ordered]@{ ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-SPDatabaseHealth.ps1
Test-SPDatabaseHealth.ps1
Function Test-SPDatabaseHealth { [CmdletBinding()] param ( #[System.Management.Automation.Runspaces.PSSession]$RemoteSession [hashtable]$PoShMonConfiguration ) $mainOutput = Get-InitialOutputWithTimer ` -SectionHeader "Database Status...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Invoke-SPMonitoring.ps1
Invoke-SPMonitoring.ps1
Function Invoke-SPMonitoring { [CmdletBinding()] Param( [parameter(Mandatory=$true, HelpMessage="A PoShMonConfiguration instance - use New-PoShMonConfiguration to create it")] [hashtable]$PoShMonConfiguration ) if ($PoShMonConfiguration.SharePoint -eq $null) { $PoShMonConfiguration.Shar...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Get-SPResolutions.ps1
Get-SPResolutions.ps1
Function Get-SPResolutions { [CmdletBinding()] Param( ) $tests = [string[]]@( "HighCPUWhileSearchRunning" ) return $tests }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-SPJobHealth.ps1
Test-SPJobHealth.ps1
Function Test-SPJobHealth { [CmdletBinding()] param ( #[System.Management.Automation.Runspaces.PSSession]$RemoteSession, [hashtable]$PoShMonConfiguration ) #'WebApplicationName' = 'Web Application Name'; $mainOutput = Get-InitialOutputWithTimer ` ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-SPSearchHealth.ps1
Test-SPSearchHealth.ps1
Function Test-SPSearchHealth { [CmdletBinding()] param ( #[System.Management.Automation.Runspaces.PSSession]$RemoteSession [hashtable]$PoShMonConfiguration ) Write-Verbose "Getting Search Service App..." $searchApp = Invoke-RemoteCommand -PoShMonConfiguration $PoShMonConfiguratio...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Get-SPMerges.ps1
Get-SPMerges.ps1
Function Get-SPMerges { [CmdletBinding()] Param( ) $tests = [string[]]@( "WinOSTests" ) return $tests }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-SPUPSSyncHealth.ps1
Test-SPUPSSyncHealth.ps1
Function Test-SPUPSSyncHealth { [CmdletBinding()] param ( #[System.Management.Automation.Runspaces.PSSession]$RemoteSession, [hashtable]$PoShMonConfiguration ) Write-Verbose "Getting UPS Service App..." $upsApp = Invoke-RemoteCommand -PoShMonConfiguration $PoShMonCon...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Get-SPTests.ps1
Get-SPTests.ps1
Function Get-SPTests { [CmdletBinding()] Param( ) $tests = [string[]]@( #"FarmHealth", "EventLogs", "CPULoad", "Memory", "DriveSpace", "ComputerTime", "SPServerStatus", "SPWindowsServiceState", "SPJobHealth",...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-SPWindowsServiceState.ps1
Test-SPWindowsServiceState.ps1
Function Test-SPWindowsServiceState { [CmdletBinding()] param ( #[System.Management.Automation.Runspaces.PSSession]$RemoteSession, [hashtable]$PoShMonConfiguration ) $mainOutput = Get-InitialOutputWithTimer -SectionHeader "Windows Service State" -GroupBy 'ServerName' -OutputHead...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Get-SPServerForRemoteServer.ps1
Get-SPServerForRemoteServer.ps1
Function Get-SPServerForRemoteServer { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration, [string]$ServerName ) try { $remoteSession = New-PSSession -ComputerName $ServerName -ConfigurationName $PoShMonConfiguration.General.ConfigurationName $server ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Resolve-HighCPUWhileSearchRunning.ps1
Resolve-HighCPUWhileSearchRunning.ps1
Function Resolve-HighCPUWhileSearchRunning { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration, [System.Collections.ArrayList]$TestOutputValues ) Write-Verbose "`tResolving High CPU While Search is running" $highCpuOutputValues = $TestOutputValues | Where { $_.Se...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Get-ServersInSPFarm.ps1
Get-ServersInSPFarm.ps1
Function Get-ServersInSPFarm { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration ) #try #{ $remoteSession = Connect-PrimaryServer -PoShMonConfiguration $PoShMonConfiguration -InitiationScriptBlock { Add-PSSnapin Microsoft...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-SPServerStatus.ps1
Test-SPServerStatus.ps1
Function Test-SPServerStatus { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) $mainOutput = Get-InitialOutputWithTimer ` -SectionHeader "Farm Server Status" ` -OutputHeaders ([ordered]@{ 'Serv...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Get-SPTestNames.ps1
Get-SPTestNames.ps1
Function Get-SPTestNames { [CmdletBinding()] Param( ) $tests = Get-SPTests return "'" + [system.String]::Join("','", $tests) + "'" #formatted easily for use in TestsToSkip }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Monitoring.SharePoint/Test-FarmHealth.ps1
Test-FarmHealth.ps1
Function Test-FarmHealth { [CmdletBinding()] param ( #[System.Management.Automation.Runspaces.PSSession]$RemoteSession [hashtable]$PoShMonConfiguration ) $mainOutput = Get-InitialOutputWithTimer -SectionHeader "Farm Overview" -OutputHeaders ([ordered]@{ 'ConfigDB' = 'Config DB N...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Shared/Get-VersionUpgradeInformation.ps1
Get-VersionUpgradeInformation.ps1
Function Get-VersionUpgradeInformation { [CmdletBinding()] param ( [hashtable]$PoShMonConfiguration ) if ($PoShMonConfiguration.General.SkipVersionUpdateCheck) { return "Version check skipped" } else { $currentVersion = Get-Module PoShMon -ListAvailable | Sele...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Shared/Add-Scripts.ps1
Add-Scripts.ps1
Function Add-Scripts { [CmdletBinding()] Param( [string[]]$RepairScripts ) $scriptsLoaded = @() Foreach($scriptToImport in $RepairScripts) { if (Test-Path $scriptToImport) { . $scriptToImport $scriptsLoaded += $scriptToImport | Get-...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Shared/Connect-PrimaryServer.ps1
Connect-PrimaryServer.ps1
Function Connect-PrimaryServer { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [scriptblock]$InitiationScriptBlock, [object[]]$ArgumentList = $null ) $remoteSession = Connect-RemoteSession $PoShMonConfiguration if ($InitiationScriptBlock -ne $null -a...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Shared/Update-PoShMon.ps1
Update-PoShMon.ps1
Function Update-PoShMon { [CmdletBinding()] param( ) $currentVersion = Get-Module PoShMon -ListAvailable | Select -First 1 | Sort Version $galleryVersion = Find-Module PoShMon -Repository PSGallery if ($currentVersion.Version -eq $galleryVersion.Version) { Write-Host ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Shared/Disconnect-RemoteSession.ps1
Disconnect-RemoteSession.ps1
Function Disconnect-RemoteSession { [cmdletbinding()] param( $RemoteSession ) Remove-PSSession $RemoteSession }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Shared/Invoke-RemoteCommand.ps1
Invoke-RemoteCommand.ps1
Function Invoke-RemoteCommand { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [scriptblock]$scriptBlock, [object[]]$ArgumentList = $null ) #try #{ if ($Global:PoShMon_RemoteSession -eq $null) { throw "No Remote Session Defined" } ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Shared/Connect-RemoteSession.ps1
Connect-RemoteSession.ps1
Function Connect-RemoteSession { [cmdletbinding()] param( [hashtable]$PoShMonConfiguration ) if ($PoShMonConfiguration.General.ConfigurationName -ne $null) { $remoteSession = New-PSSession -ComputerName $PoShMonConfiguration.General.PrimaryServerName -Name $PoShMonConfiguration....
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Repairs/New-EmailRepairFooter.ps1
New-EmailRepairFooter.ps1
Function New-EmailRepairFooter { [CmdletBinding()] param( ) $emailSection = '' $emailSection += '</body>' return $emailSection; }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Repairs/New-EmailRepairHeader.ps1
New-EmailRepairHeader.ps1
Function New-EmailRepairHeader { [CmdletBinding()] param( [string]$ReportTitle = "PoShMon Repairs Report" ) $emailSection = '<head><title>' + $ReportTitle + '</title></head><body><h1>' + $ReportTitle + '</h1>' return $emailSection; }
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Repairs/New-EmailRepairOutputBody.ps1
New-EmailRepairOutputBody.ps1
Function New-EmailRepairOutputBody { [cmdletbinding()] param( $Output ) $emailSection = '' $title = $output.SectionHeader $emailSection += "<p><h1>$title</h1>" $emailSection += '<table border="1">' if ($output.ContainsKey("Exception")) { $emailSect...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Repairs/New-EmailRepairBody.ps1
New-EmailRepairBody.ps1
Function New-EmailRepairBody { [CmdletBinding()] Param( [hashtable]$PoShMonConfiguration, [object[]]$RepairOutputValues ) $emailBody = '' $emailBody += New-EmailRepairHeader "$($PoShMonConfiguration.General.EnvironmentName) Repairs Report" foreach ($rep...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Functions/PoShMon.Notifications.Email.Repairs/New-EmailRepairSubject.ps1
New-EmailRepairSubject.ps1
Function New-EmailRepairSubject { [CmdletBinding()] param( [hashtable]$PoShMonConfiguration, [object[]]$RepairOutputValues ) $subject = "[PoshMon] $($PoShMonConfiguration.General.EnvironmentName) Repair Results ($($RepairOutputValues.Count) Repairs(s) Performed)" return $...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/PoShMon.Tests.ps1
PoShMon.Tests.ps1
Import-Module Pester $path = (Split-Path -Parent $MyInvocation.MyCommand.Path) $testsPath = "$path\CI" Invoke-Pester -Path $testsPath #-CodeCoverage "$sutPath\*\*.ps1" #$scriptFiles = @( Get-ChildItem -Path "$path\*\*.ps1" -Recurse -ErrorAction SilentlyContinue ) #$scriptFiles = @( Get-ChildItem -Path "$pa...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/appveyorCITests.ps1
appveyorCITests.ps1
#based on code from https://github.com/RamblingCookieMonster/PSDiskPart/ $ProjectRoot = $ENV:APPVEYOR_BUILD_FOLDER Set-Location $ProjectRoot #$path = (Split-Path -Parent $MyInvocation.MyCommand.Path) Import-Module Pester Invoke-Pester -Path "$ProjectRoot\src\Tests\CI" -CodeCoverage "$ProjectRoot\src\Function...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/Non-CI/ExternalDependencies/PoShMon.Notifications.O365Teams/Send-O365TeamsMessage.Tests.ps1
Send-O365TeamsMessage.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") $o365TeamsConfigPath = [Environment]::GetFolderPath("MyDocuments") + "\o365TeamsConfig.json"...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/Non-CI/ExternalDependencies/PoShMon.Notifications.Pushbullet/Send-PushbulletMessage.Tests.ps1
Send-PushbulletMessage.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") $pushbulletConfigPath = [Environment]::GetFolderPath("MyDocuments") + "\pushbulletconfig.jso...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/Non-CI/ExternalDependencies/PoShMon.Notifications.Email.Monitoring/New-EmailBody.Tests.ps1
New-EmailBody.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "New-EmailBody" { It "Should return a the correct html for given test output" ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Configuration/New-PoShMonConfiguration.Tests.ps1
New-PoShMonConfiguration.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "New-PoShMonConfiguration" { It "Should work with a minimal configuration" { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Configuration/O365Teams.Tests.ps1
O365Teams.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "O365TeamsConfiguration" { It "Should return a matching configuration to what ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Notifications.O365Teams/New-O365TeamsMessageBody.Tests.ps1
New-O365TeamsMessageBody.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "New-O365TeamsMessageBody" { InModuleScope PoShMon { It "Should ret...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Notifications.Pushbullet/New-PushbulletMessageBody.Tests.ps1
New-PushbulletMessageBody.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "New-PushbulletMessageBody" { InModuleScope PoShMon { It "Should re...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Test-DriveSpace.Tests.ps1
Test-DriveSpace.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-DriveSpace" { InModuleScope PoShMon { class DiskMock { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Test-ComputerTime.Tests.ps1
Test-ComputerTime.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-ComputerTime" { InModuleScope PoShMon { class ServerTimeMock { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Test-CPULoad.Tests.ps1
Test-CPULoad.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-CPULoad" { InModuleScope PoShMon { class CounterSampleMock { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Invoke-OSMonitoring.Tests.ps1
Invoke-OSMonitoring.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Invoke-OSMonitoring" { It "Should work with a minimal configuration" { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Merge-WinOSTests.Tests.ps1
Merge-WinOSTests.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Merge-WinOSTests" { It "Should return a matching output structure" { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Test-ServiceState.Tests.ps1
Test-ServiceState.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-ServiceState" { InModuleScope PoShMon { class ServiceInstance...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Test-EventLogs.Tests.ps1
Test-EventLogs.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-EventLogs" { InModuleScope PoShMon { class EventLogItemMock {...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.OS/Test-Memory.Tests.ps1
Test-Memory.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-Memory" { InModuleScope PoShMon { class ServerMemoryMock { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.Web/Test-WebSite.Tests.ps1
Test-WebSite.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-Website" { InModuleScope PoShMon { class WebRequestMock { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Notifications.Email.Monitoring/New-EmailFooter.Tests.ps1
New-EmailFooter.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "New-EmailFooter" { InModuleScope PoShMon { class ModuleMock { ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.SharePoint/Test-SPDistributedCacheHealth.Tests.ps1
Test-SPDistributedCacheHealth.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-SPDistributedCacheHealth" { InModuleScope PoShMon { class SPD...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.SharePoint/Test-SPWindowsServiceState.Tests.ps1
Test-SPWindowsServiceState.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-SPWindowsServiceState" { InModuleScope PoShMon { class SPServ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.SharePoint/Test-SPUPSSyncHealth.Tests.ps1
Test-SPUPSSyncHealth.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-SPUPSSyncHealth" { InModuleScope PoShMon { class UpsServiceIn...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.SharePoint/Test-SPSearchHealth.Tests.ps1
Test-SPSearchHealth.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-SPSearchHealth" { InModuleScope PoShMon { class SearchItemsMo...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.SharePoint/Test-SPJobHealth.Tests.ps1
Test-SPJobHealth.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Test-SPJobHealth" { InModuleScope PoShMon { class SPJobHealthMock ...
PowerShellCorpus/PowerShellGallery/PoShMon/0.13.0/Tests/CI/Unit/PoShMon.Monitoring.SharePoint/Resolve-HighCPUWhileSearchRunning.Tests.ps1
Resolve-HighCPUWhileSearchRunning.Tests.ps1
$rootPath = Join-Path (Split-Path -Parent $MyInvocation.MyCommand.Path) -ChildPath ('..\..\..\..\') -Resolve Remove-Module PoShMon -ErrorAction SilentlyContinue Import-Module (Join-Path $rootPath -ChildPath "PoShMon.psd1") Describe "Resolve-HighCPUWhileSearchRunning" { InModuleScope PoShMon { class...