full_path
stringlengths
31
232
filename
stringlengths
4
167
content
stringlengths
0
48.3M
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-iRule.ps1
Get-iRule.ps1
Function Get-iRule { <# .SYNOPSIS Retrieve specified iRule(s) .NOTES iRule names are case-specific. #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Alias("iRuleName")] [Parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyN...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-VirtualServer.ps1
Remove-VirtualServer.ps1
Function Remove-VirtualServer{ <# .SYNOPSIS Remove the specified virtual server(s). Confirmation is needed. .NOTES Virtual server names are case-specific. #> [cmdletBinding( SupportsShouldProcess=$true, ConfirmImpact="High")] param ( $F5Session=$Script:F5Session, [Alias('...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Test-F5Session.ps1
Test-F5Session.ps1
Function Test-F5Session { <# .SYNOPSIS Check that the F5Session object has a valid base URL and PSCredential object #> [cmdletBinding()] param ( [Parameter(Mandatory=$true)][AllowNull()]$F5Session ) #Validate F5Session If ($($F5Session.BaseURL) -ne ("https://$($F5Session.Name)...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-PoolMember.ps1
Remove-PoolMember.ps1
Function Remove-PoolMember { <# .SYNOPSIS Remove member node(s) from a pool .NOTES Pool and member names are case-specific. #> [cmdletBinding( SupportsShouldProcess=$true, ConfirmImpact='High')] param ( $F5Session=$Script:F5Session, # InputObject could be Pool objects, but sh...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-VirtualServer.ps1
Get-VirtualServer.ps1
Function Get-VirtualServer{ <# .SYNOPSIS Retrieve specified virtual server(s) #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, [Alias("VirtualServerName")] [Parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [strin...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Add-PoolMember.ps1
Add-PoolMember.ps1
Function Add-PoolMember{ <# .SYNOPSIS Add a computer to a pool as a member .LINK [Modifying pool members](https://devcentral.f5.com/questions/modifying-pool-members-through-rest-api) [Add a pool with an existing node member](https://devcentral.f5.com/questions/add-a-new-pool-with-an-existing-node) #> [c...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Test-HealthMonitor.ps1
Test-HealthMonitor.ps1
Function Test-HealthMonitor { <# .SYNOPSIS Test whether the specified health monitor(s) exist .NOTES HealthMonitor names are case-specific. #> [cmdletBinding()] [OutputType([bool])] param ( $F5Session=$Script:F5Session, [Alias('MonitorName')] [Parameter(Mandator...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-PoolMember.ps1
Get-PoolMember.ps1
Function Get-PoolMember { <# .SYNOPSIS Retrieve specified pool member(s) .NOTES Pool and member names are case-specific. #> [cmdletBinding(DefaultParameterSetName='InputObject')] param( $F5Session=$Script:F5Session, [Alias('Pool')] [Parameter(Mandatory=$false,Paramet...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-PoolMonitor.ps1
Get-PoolMonitor.ps1
Function Get-PoolMonitor { <# .SYNOPSIS Get pool monitor(s) .NOTES Pool and monitor names are case-specific. #> [cmdletBinding(DefaultParameterSetName='InputObject')] param( $F5Session=$Script:F5Session, [Alias('Pool')] [Parameter(Mandatory=$false,ParameterSetName='I...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Add-iRuleToVirtualServer.ps1
Add-iRuleToVirtualServer.ps1
Function Add-iRuleToVirtualServer { <# .SYNOPSIS Add an iRule to the specified virtual server .NOTES This function defaults to the /Common partition #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',Val...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Disable-PoolMember.ps1
Disable-PoolMember.ps1
Function Disable-PoolMember { <# .SYNOPSIS Disable a pool member in the specified pools If no pool is specified, the member will be disabled in all pools #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',ValueFr...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Test-VirtualServer.ps1
Test-VirtualServer.ps1
Function Test-VirtualServer { <# .SYNOPSIS Test whether the specified virtual server(s) exist .NOTES Virtual server names are case-specific. #> [cmdletBinding()] [OutputType([bool])] param ( $F5Session=$Script:F5Session, [Alias("VirtualServerName")] [Parameter(M...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Add-PoolMonitor.ps1
Add-PoolMonitor.ps1
Function Add-PoolMonitor { <# .SYNOPSIS Add a health monitor to a pool #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',ValueFromPipeline=$true)] [Alias('Pool')] [PSObject[]]$InputObject, ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Enable-VirtualServer.ps1
Enable-VirtualServer.ps1
Function Enable-VirtualServer { <# .SYNOPSIS Enable a virtual server #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Alias('VirtualServer')] [Parameter(Mandatory=$false,ParameterSetName='InputObject',ValueFromPipeline=$true)] [PSObject[]]$InputObject, ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Set-Pool.ps1
Set-Pool.ps1
Function Set-Pool { <# .SYNOPSIS Create or update Pool(s) .DESCRIPTION Can create new or update existing Pool(s). .PARAMETER InputObject The content of the Pool. .PARAMETER Application The iApp of the Pool. .PARAMETER ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-HealthMonitor.ps1
Get-HealthMonitor.ps1
Function Get-HealthMonitor { <# .SYNOPSIS Retrieve specified health monitor(s) .NOTES Health monitor names are case-specific. #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, [Alias('MonitorName')] [Parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFr...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-PoolMemberStats.ps1
Get-PoolMemberStats.ps1
Function Get-PoolMemberStats { <# .SYNOPSIS Retrieve pool member statistics .NOTES Pool and member names are case-specific. #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, # InputObject could be Pool objects, but should ultimately be PoolMember objects [Al...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Test-Node.ps1
Test-Node.ps1
Function Test-Node { <# .SYNOPSIS Test whether the specified node(s) exist .NOTES Node names are case-specific. #> [cmdletBinding(DefaultParameterSetName='Address')] [OutputType([bool])] param ( $F5Session=$Script:F5Session, [Parameter(Mandatory,ParameterSetName='Address...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/New-HealthMonitor.ps1
New-HealthMonitor.ps1
Function New-HealthMonitor { <# .SYNOPSIS Create a new health monitor .EXAMPLE New-HealthMonitor -F5Session $F5Session -Name "/Common/test123" -Type http -Receive '^HTTP.1.[0-2]\s([2|3]0[0-9])' -Send 'HEAD /host.ashx?isup HTTP/1.1\r\nHost: Test123.dyn-intl.com\r\nConnection: close\r\n\r\n' #> [c...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/New-Node.ps1
New-Node.ps1
Function New-Node { <# .SYNOPSIS Create Node(s) .EXAMPLE New-Node -Address 192.168.1.42 #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='Address',ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Set-PoolMemberDescription.ps1
Set-PoolMemberDescription.ps1
Function Set-PoolMemberDescription { <# .SYNOPSIS Set the description value for the specified pool member #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',ValueFromPipeline=$true)] [Alias('PoolMember')] ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-StatusShape.ps1
Get-StatusShape.ps1
Function Get-StatusShape { <# .SYNOPSIS Determine the shape to display for a member's current state and session values #> [cmdletBinding()] [OutputType([String])] param( [Parameter(Mandatory=$true)]$state, [Parameter(Mandatory=$true)]$session ) #Determine status shap...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Invoke-RestMethodOverride.ps1
Invoke-RestMethodOverride.ps1
Function Invoke-RestMethodOverride { [cmdletBinding(DefaultParameterSetName='Anonymous')] [OutputType([Xml.XmlDocument])] [OutputType([Microsoft.PowerShell.Commands.HtmlWebResponseObject])] [OutputType([String])] [OutputType([bool])] param ( [Parameter(Mandatory=$true)][Microsoft...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Disable-Node.ps1
Disable-Node.ps1
Function Disable-Node { <# .SYNOPSIS Disable a node to quickly disable all pool members associated with it #> [cmdletBinding(DefaultParameterSetName='Address')] param ( $F5Session=$Script:F5Session, [Alias('Node')] [Parameter(Mandatory,ParameterSetName='InputObject',ValueF...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-BIGIPPartition.ps1
Get-BIGIPPartition.ps1
Function Get-BIGIPPartition { <# .SYNOPSIS Retrieve specified Partition(s) .NOTES Partition names are case-specific. #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, [Alias('Folder')] [Alias('Partition')] [Parameter(Mandatory=$false,ValueFromPipeli...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Sync-DeviceToGroup.ps1
Sync-DeviceToGroup.ps1
Function Sync-DeviceToGroup { <# .SYNOPSIS Sync the specified device to the group. This assumes the F5 session object is for the device that will be synced to the group. #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)]$GroupName ) #T...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-PoolMonitor.ps1
Remove-PoolMonitor.ps1
Function Remove-PoolMonitor { <# .SYNOPSIS Remove health monitor(s) from a pool .NOTES Health monitor names are case-specific. #> [cmdletBinding( SupportsShouldProcess=$true, ConfirmImpact="Low")] param( $F5Session=$Script:F5Session, [Alias('Pool')] [Parameter(Man...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/New-VirtualServer.ps1
New-VirtualServer.ps1
Function New-VirtualServer { <# .SYNOPSIS Create a new virtual server #> [cmdletbinding(SupportsShouldProcess = $True,DefaultParameterSetName="VlanEnabled")] param ( $F5Session = $Script:F5Session , [Parameter(Mandatory = $false)]$Kind = 'tm:ltm:virtual:virtualstate' , ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-iRuleFromVirtualServer.ps1
Remove-iRuleFromVirtualServer.ps1
Function Remove-iRuleFromVirtualServer { <# .SYNOPSIS Remove an iRule from the specified virtual server .NOTES This function defaults to the /Common partition #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',V...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Set-iRule.ps1
Set-iRule.ps1
Function Set-iRule { <# .SYNOPSIS Create or updates an iRule .DESCRIPTION Can create a new, and update an existing iRule. Removes iRule from VirtualServers and adds them back again after uploading new iRule. The command supports -whatif ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Test-Functionality.ps1
Test-Functionality.ps1
Function Test-Functionality{ <# .SYNOPSIS Perform some standard tests to make sure things work as expected .EXAMPLE Test-Functionality -F5Session $F5session -TestVirtualServer 'virt123' -TestVirtualServerIP '10.1.1.240' -TestPool 'testpool123' -PoolMemberAddress '10.1.1.100' #> [Diagnostics.CodeAnaly...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Remove-ProfileRamCache.ps1
Remove-ProfileRamCache.ps1
Function Remove-ProfileRamCache{ <# .SYNOPSIS Delete the contents of a RAM cache for the specified profile .NOTES Example profile: "profile/http/ramcache" #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)]$ProfileName ) #Test that...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-F5Status.ps1
Get-F5Status.ps1
Function Get-F5Status{ <# .SYNOPSIS Test whether the specified F5 is currently in active or standby failover mode #> [cmdletBinding()] param ( $F5Session=$Script:F5Session ) #Test that the F5 session is in a...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-HealthMonitorType.ps1
Get-HealthMonitorType.ps1
Function Get-HealthMonitorType { <# .SYNOPSIS Retrieve the specified health monitor type(s). #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, [Alias('Type')] [Parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [str...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Enable-Node.ps1
Enable-Node.ps1
Function Enable-Node { <# .SYNOPSIS Enable a node to quickly enable all pool members associated with it #> [cmdletBinding(DefaultParameterSetName='Address')] param ( $F5Session=$Script:F5Session, [Alias('Node')] [Parameter(Mandatory,ParameterSetName='InputObject',ValueFrom...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Get-Pool.ps1
Get-Pool.ps1
Function Get-Pool { <# .SYNOPSIS Retrieve specified pool(s) .NOTES Pool names are case-specific. #> [cmdletBinding()] param ( $F5Session=$Script:F5Session, [Alias('PoolName')] [Parameter(Mandatory=$false,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)]...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-CurrentConnectionCount.ps1
Get-CurrentConnectionCount.ps1
Function Get-CurrentConnectionCount { <# .SYNOPSIS Get-CurrentConnectionCount is deprecated. Please use Get-PoolMemberStats | Select-Object -ExpandProperty 'serverside.curConns' #> param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)] [string[]]$PoolName, ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Set-PoolLoadBalancingMode.ps1
Set-PoolLoadBalancingMode.ps1
Function Set-PoolLoadBalancingMode { <# .SYNOPSIS Set-PoolLoadBalancingMode is deprecated. Please use Set-Pool #> [cmdletBinding()] param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true,ParameterSetName='InputObject',ValueFromPipeline=$true)] [Alias('Pool')] ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-PoolMemberCollection.ps1
Get-PoolMemberCollection.ps1
Function Get-PoolMemberCollection { <# .SYNOPSIS Get-PoolMemberCollection is deprecated. Please use Get-PoolMember #> param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)]$PoolName ) Write-Warning "Get-PoolMemberCollection is deprecated. Please use Get-PoolMember" ...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-PoolMemberStatus.ps1
Get-PoolMemberStatus.ps1
Function Get-PoolMemberStatus { <# .SYNOPSIS Get-PoolMemberStatus is deprecated. Please use Get-PoolMember | Select-Object -Property name,session,state #> param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)]$ComputerName, [Parameter(Mandatory=$true)]$PoolName )...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-iRuleCollection.ps1
Get-iRuleCollection.ps1
Function Get-iRuleCollection { <# .SYNOPSIS Retrieve specified iRule(s) #> param( $F5Session=$Script:F5Session ) Write-Warning "Get-iRuleCollection is deprecated. Please use Get-iRule" Get-iRule -F5session $F5Session }
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-PoolList.ps1
Get-PoolList.ps1
Function Get-PoolList { <# .SYNOPSIS Get-PoolList is deprecated. Please use Get-Pool | Select-Object -ExpandProperty fullPath #> param ( $F5Session=$Script:F5Session ) Write-Warning "Get-PoolList is deprecated. Please use Get-Pool | Select-Object -ExpandProperty fullPath" Get-Pool...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-PoolMemberDescription.ps1
Get-PoolMemberDescription.ps1
Function Get-PoolMemberDescription { <# .SYNOPSIS Get-PoolMemberDescription is deprecated. Please use Get-PoolMember | Select-Object -ExpandProperty description #> param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)]$ComputerName, [Parameter(Mandatory=$true)]$PoolNa...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-PoolMemberIP.ps1
Get-PoolMemberIP.ps1
Function Get-PoolMemberIP { <# .SYNOPSIS Get-PoolMemberIP is deprecated. Please use Get-PoolMember | Select-Object -ExpandProperty address #> param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)]$ComputerName, [Parameter(Mandatory=$true)]$PoolName ) Write-W...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-F5session.ps1
Get-F5session.ps1
Function Get-F5session{ <# .SYNOPSIS Get-F5session is deprecated. Please use New-F5Session #> param( [Parameter(Mandatory=$true)][string]$LTMName, [Parameter(Mandatory=$true)][System.Management.Automation.PSCredential]$LTMCredentials ) Write-Warning "Get-F5session is depreca...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-VirtualServeriRuleCollection.ps1
Get-VirtualServeriRuleCollection.ps1
Function Get-VirtualServeriRuleCollection { <# .SYNOPSIS Get-VirtualServeriRuleCollection is deprecated. Please use Get-VirtualServer | Select-Object -ExpandProperty rules #> param ( $F5Session=$Script:F5Session, [Alias("VirtualServerName")] [Parameter(Mandatory=$false,Valu...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-VirtualServerList.ps1
Get-VirtualServerList.ps1
Function Get-VirtualServerList{ <# .SYNOPSIS Get-VirtualServerList is deprecated. Please use Get-VirtualServer | Select-Object -ExpandProperty fullPath #> param ( $F5Session=$Script:F5Session ) Write-Warning "Get-VirtualServerList is deprecated. Please use Get-VirtualServer | Select-Ob...
PowerShellCorpus/PowerShellGallery/f5-ltm/1.4.185/Public/Deprecated/Get-PoolMemberCollectionStatus.ps1
Get-PoolMemberCollectionStatus.ps1
Function Get-PoolMemberCollectionStatus { <# .SYNOPSIS Get-PoolMemberCollectionStatus is deprecated. Please use Get-PoolMember | Select-Object -Property name,session,state #> param( $F5Session=$Script:F5Session, [Parameter(Mandatory=$true)]$PoolName ) Write-Warning "Get-PoolMem...
PowerShellCorpus/PowerShellGallery/NanoServerPackage/1.0.1.0/Test/NanoServerPackage.Find.Tests.ps1
NanoServerPackage.Find.Tests.ps1
# only have 1 version for now :( $minVersion = "10.0.14300.1000" $maxVersion = "10.0.14393.1000" $requiredVersion = "10.0.14393.0" $totalPackages="17" $computePackage = "Microsoft-NanoServer-Compute-Package" Describe "Find-NanoServerPackage Stand-Alone" { BeforeAll { Import-packageprovider -forc...
PowerShellCorpus/PowerShellGallery/NanoServerPackage/1.0.1.0/Test/Comprehensive.tests.ps1
Comprehensive.tests.ps1
# you need to modify # 1. $vhdPath to match your Nano Vm $vhdPath = "C:\test\rtmRefreshStdEdition.vhd" $providerName = "NanoServerPackage" $commonPackages = @( "Microsoft-NanoServer-Defender-Package", "Microsoft-NanoServer-ShieldedVM-Package", "Microsoft-NanoServer-Compute-Package", "Mi...
PowerShellCorpus/PowerShellGallery/NanoServerPackage/1.0.1.0/Test/NanoServerPackage.Save.Tests.ps1
NanoServerPackage.Save.Tests.ps1
#$here = Split-Path -Parent $MyInvocation.MyCommand.Path #$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Save.Tests.ps1", ".psm1") #. "$here\..\$sut" $minVersion = "10.0.14300.1000" $maxVersion = "10.0.14393.1000" $requiredVersion = "10.0.14393.0" Describe "Save-WindowsPackage Stand-Alone" { ...
PowerShellCorpus/PowerShellGallery/NanoServerPackage/1.0.1.0/Test/NanoServerPackage.Install.Tests.ps1
NanoServerPackage.Install.Tests.ps1
# # # you need to modify # 1. $vhdPath to match your Nano Vm # 2. $requiredVersion needs to be updated if there are new packages published # # $vhdPath = "C:\test\rtmRefreshStdEdition.vhd" $culture = (Get-Culture).Name $dcbPackage = "Microsoft-NanoServer-DCB-Package" $computePackage = "Microsoft-NanoServer...
PowerShellCorpus/PowerShellGallery/PoSHue/1.2.1/PoSHue.ps1
PoSHue.ps1
Enum LightState { # Defines a state of the light for methods that can # specify the state of the light to On or Off. On = $True Off = $False } Enum ColourMode { # Defines the colour modes that can be set on the light. xy ct hs } Enum AlertType { # Defines the accepte...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/install.ps1
install.ps1
[CmdletBinding()] param ( [string]$Path ) $localpath = $(Join-Path -Path (Split-Path -Path $profile) -ChildPath '\Modules\dbareports') try { if ($Path.length -eq 0) { if ($PSCommandPath.Length -gt 0) { $path = Split-Path $PSCommandPath if ($path -match "github") { $path = $localpath } } ...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/tests/SharedFunctions.Tests.ps1
SharedFunctions.Tests.ps1
#Thank you Warren http://ramblingcookiemonster.github.io/Testing-DSC-with-Pester-and-AppVeyor/ if(-not $PSScriptRoot) { $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } $Verbose = @{} if($env:APPVEYOR_REPO_BRANCH -and $env:APPVEYOR_REPO_BRANCH -notlike "master") { $Verbose.add("Verbose",$True)...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/tests/dbareports.tests.ps1
dbareports.tests.ps1
$Path = Split-Path -Parent $MyInvocation.MyCommand.Path $ModulePath = (get-item $Path ).parent.FullName $ModuleName = (Split-Path -Leaf $MyInvocation.MyCommand.Path) -Replace ".Tests.ps1" $ManifestPath = "$ModulePath\$ModuleName.psd1" # test the module manifest - exports the right functions, processes the right form...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/tests/Install-dbareports.Tests.ps1
Install-dbareports.Tests.ps1
#Thank you Warren http://ramblingcookiemonster.github.io/Testing-DSC-with-Pester-and-AppVeyor/ if(-not $PSScriptRoot) { $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } $Verbose = @{} if($env:APPVEYOR_REPO_BRANCH -and $env:APPVEYOR_REPO_BRANCH -notlike "master") { $Verbose.add("Verbose",$True)...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/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) #Initialize some variables, move to the project root $...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/tests/Add-DBRServerToInventory.Tests.ps1
Add-DBRServerToInventory.Tests.ps1
#Thank you Warren http://ramblingcookiemonster.github.io/Testing-DSC-with-Pester-and-AppVeyor/ if(-not $PSScriptRoot) { $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent } $Verbose = @{} if($env:APPVEYOR_REPO_BRANCH -and $env:APPVEYOR_REPO_BRANCH -notlike "master") { $Verbose.add("Verbose",$True)...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/TestAccess.ps1
TestAccess.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .NOTES dbareports PowerShell...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/Shared.ps1
Shared.ps1
# This needs to be here becuse it's not part of a module. $null = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") Function Connect-SqlServer { <# .SYNOPSIS Internal function that creates SMO server object. Input can be text or SMO.Server. #> [CmdletBinding()] param ( [Parameter(Man...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/LogFileErrorMessages.ps1
LogFileErrorMessages.ps1
<# .SYNOPSIS This Script will check the Log Files in the Log File Folder for errors adn warnings and insert them into the LogFileErrorMessages table .DESCRIPTION This Script will check the Log Files in the Log File Folder for errors adn warnings and insert them into the LogFileErrorMessages table .NOTES dbareport...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/DiskSpace.ps1
DiskSpace.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather the Windows Info and save to the Info.ServerInfo table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather the Windows Info and save to the Info.ServerInfo table .NOTES dbareports PowerShell...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/ServerOSInfo.ps1
ServerOSInfo.ps1
<# Hopefully this fixes this bit # This currently doesn't work so well with clusters. Will have to slightly reorg database? # I dont know if the above is still true. Plz evaluate. I think it is. Other useful things $system.Manufacturer $system.Model Lots of stuff in OS Yes this...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/SuspectPages.ps1
SuspectPages.ps1
<# .SYNOPSIS .DESCRIPTION .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either ...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/CleanLogs.ps1
CleanLogs.ps1
<# .SYNOPSIS .DESCRIPTION .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either ...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/Alerts.ps1
Alerts.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather the Alerts Information to the info.Alerts table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather the Alerts Information to the info.Alerts table .NOTES dbareports PowerShell module (https...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/Databases.ps1
Databases.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather the Database name and size to the Info.Databases table .NOTES dbareports PowerShell...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/AgentJobServer.ps1
AgentJobServer.ps1
<# # ROB IS THIS SUPPOSED TO KEEP HISTORICAL INFORMATION? IF SO $UPDATE WILL ALWAYS BE FALSE .SYNOPSIS Adds data to the DBA database for agent job results in a server list .DESCRIPTION Connects to a server list and iterates though reading the agent job results and adds data to the DBA Database - This is ru...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/SQLInfo.ps1
SQLInfo.ps1
<# .SYNOPSIS This Script will check all of the instances in the InstanceList and gather SQL Configuration Info and save to the Info.SQLInfo table .DESCRIPTION This Script will check all of the instances in the InstanceList and gather SQL Configuration Info and save to the Info.SQLInfo table .NOTES dbare...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/setup/powershell/AgentJobDetail.ps1
AgentJobDetail.ps1
<# .SYNOPSIS Adds data to the DBA database for agent job results in a server list .DESCRIPTION Connects to a server list and iterates though reading the agent job results and adds data to the DBA Database - This is run as an agent job on LD5v-SQL11n-I06 .NOTES dbareports PowerShell module (https://dbarepo...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/samples/InModule.Help.Tests.ps1
InModule.Help.Tests.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.119 Created on: 4/12/2016 1:11 PM Created by: June Blender Organization: SAPIEN Technologies, Inc Filename: *.Help.Tests.ps1 ===============...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/samples/Tests/Estate.Tests.ps1
Estate.Tests.ps1
# Runs a quick check against the servers returned from the $query # ONLY CHECKS DEFAULT INSTANCES [Alias("ServerInstance", "SqlInstance")] [object]$SqlServer = "--installserver--" [string]$InstallDatabase = "--installdb--" if(Get-module pester) { try { Import-Module pester } catch { Wri...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Write-Log.ps1
Write-Log.ps1
<# .Synopsis Write-Log writes a message to a specified log file with the current time stamp. .DESCRIPTION The Write-Log function is designed to add logging capability to other scripts. In addition to writing output and/or verbose you can write to a log file for later debugging. By default the function w...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/New-DbrSqlAlias.ps1
New-DbrSqlAlias.ps1
Function New-DbrSqlAlias { <# .SYNOPSIS Creates/updates a sql alias for the specified server .DESCRIPTION Creates/updates a sql alias for dbareports by altering HKLM:\SOFTWARE\Microsoft\MSSQLServer\Client .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Add-DbrCredential.ps1
Add-DbrCredential.ps1
Function Add-DbrCredential { <# .SYNOPSIS Adds a credential and proxy for SQL Agent Jobs to the dbareports server .DESCRIPTION This will create a credential and a proxy on the dbareports server using the install configuration and add the PowerShell and CmdExec subsystems .PARAMETER JobCredential The Username and pas...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Install-DbaReportsClient.ps1
Install-DbaReportsClient.ps1
Function Install-DbaReportsClient { <# .SYNOPSIS Installs only the client component of DbaReports .DESCRIPTION Installs the following on the local client: Config file at Documents\WindowsPowerShell\Modules\dbareports\dbareports-config.json The config file is pretty simple. This is for Windows (Trusted) Auth ...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Template.ps1
Template.ps1
Function Verb-SqlNoun { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License ...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrInstanceList.ps1
Get-DbrInstanceList.ps1
Function Get-DbrInstanceList { <# .SYNOPSIS Returns datatable of contents of InstanceList table .DESCRIPTION Returns datatable of contents of InstanceList table .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can red...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrNewJob.ps1
Get-DbrNewJob.ps1
Function Get-DbrNewJob { <# .SYNOPSIS .DESCRIPTION Returns the JobName, Category, Description, Enabled or not, Status, LastRunTime and Outcome of agent jobs created in the last x hours .PARAMETER Hours Return jobs created within this number of hours .NOTES dbareports PowerShell module (https://dbareports.io, SQL...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrAllinfo.ps1
Get-DbrAllinfo.ps1
Function Get-DbrAllInfo { <# .SYNOPSIS Gets all of the information in the dbareports database about an instance .DESCRIPTION Gets all of the information in the dbareports database about an instance and displays it the screen or into a text file .PARAMETER SQLInstance The Server\Instance name to gather information ab...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Set-DbrInstanceInactiveInInventory.ps1
Set-DbrInstanceInactiveInInventory.ps1
Function Set-DbrInstanceInactiveInInventory { <# .SYNOPSIS For Instances that have been decommisioned but you still want to report on .DESCRIPTION Marks the specified instance as inactive. This means that new data will not be gathered about that instance however existing data will not be removed and you will still be...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Show-SqlServerFileSystem.ps1
Show-SqlServerFileSystem.ps1
Function Show-SqlServerFileSystem { <# .SYNOPSIS Shows file system on remote SQL Server and returns the directory name of the directory you select. .DESCRIPTION Similar to the remote file system popup you see when browsing a remote SQL Server in SQL Server Management Studio, this command allows you to traverse the re...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrAgentJob.ps1
Get-DbrAgentJob.ps1
Function Get-DbrAgentJob { <# .SYNOPSIS Gets all of the dbareports SQL Agent Job information using the config file .DESCRIPTION Gets all of the dbareports SQL Agent Job information using the config file .PARAMETER Force Displays all of the information rather than the default information .NOTES dbareports PowerShe...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/DynamicParams.ps1
DynamicParams.ps1
<# These are all the functions for tab completion (auto-population of params) To use, place this after params in a function DynamicParam { if ($source) { return (Get-ParamSqlXyz -SqlServer $Source -SqlCredential $SourceCredential) } } #> Function Get-ParamSqlServerConfigs { <# .SYNOPSIS Internal function. Re...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Remove-DbrServerFromInventory.ps1
Remove-DbrServerFromInventory.ps1
Function Remove-DbrServerFromInventory { <# .SYNOPSIS Removes a server from the dbareports inventory of sql servers. .DESCRIPTION Removes instance/server from the instance list table within the dba reports database. Doing so will mean you are no longer able to report on that server. If you have decommissioned the ser...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Uninstall-DbaReports.ps1
Uninstall-DbaReports.ps1
Function Uninstall-DbaReports { <# .SYNOPSIS Uninstalls both the server and client components for dbareports .DESCRIPTION Uninstalls both the server and client components for dbareports. This process is not reversible. Various switches can be passed to uninstall while preventing the deletion/removal of various aspect...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrDetailedInfo.ps1
Get-DbrDetailedInfo.ps1
Function Get-DbrDetailedInfo { <# .SYNOPSIS Gets all of the information in the dbareports database about the estate .DESCRIPTION .PARAMETER ToScreen Outputs results to screen default parameter .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrConfig.ps1
Get-DbrConfig.ps1
Function Get-DbrConfig { <# .SYNOPSIS .DESCRIPTION .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Sof...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Add-DbrAgentJob.ps1
Add-DbrAgentJob.ps1
Function Add-DbrAgentJob { <# .SYNOPSIS Creates a single step SQL Agent job using the dba configuration .DESCRIPTION This will create a SQL Agent Job. It will use the configuration from the dbareports install, and create the job on the the dbareports folder .PARAMETER JobName The name of the Job .PARAMETER LogFileF...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Add-DbrServerToInventory.ps1
Add-DbrServerToInventory.ps1
Function Add-DbrServerToInventory { <# .SYNOPSIS Adds an instance or an array of instances to the dbareports database using the config file .DESCRIPTION This command will add a SQL Instance or an array of instances to the dbareports database using the config file generated at install or via the dbrclient command .PA...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Update-DbrConnstring.ps1
Update-DbrConnstring.ps1
Function Update-DbrConnstring { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it ...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/SharedFunctions.ps1
SharedFunctions.ps1
# These are shared, mostly internal functions. Function Update-dbareports { <# .SYNOPSIS Exported function. Updates dbareports. Deletes current copy and replaces it with freshest copy. .EXAMPLE Update-dbareports #> Invoke-Expression (Invoke-WebRequest -UseBasicParsing http://git.io/vn1hQ).Content } <# A...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrDiskSpace.ps1
Get-DbrDiskSpace.ps1
Function Get-DiskSpace { <# .SYNOPSIS Displays Disk information for all local drives on a server .DESCRIPTION Returns a custom object with Server name, name of disk, label of disk, total size, free size and percent free. .PARAMETER ComputerName The SQL Server (or server in general) that you're connecting to. The -S...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrServerLoad.ps1
Get-DbrServerLoad.ps1
<#/* Adding a new server to the DBA Database Enter the corect values against the variables The errors will tell you what you have done wrong AUTHOR - ROb Sewell DATE - 04/05/2015 - Initial - 10/08/2015 - Added some failsafes !! - 18/08/2015 - Added non contactabel and inactive to the query -- 25/092015 jw - fixe...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrInfo.ps1
Get-DbrInfo.ps1
<# /* Various queries for getting information out of the DBA Database Connect to Server hosting DBA Database Use where IL.Inactive = 0 to only get active instances */ -- Generic infomration about Servers and locations and environments Select IL.ServerName, IL.InstanceName, IL.Environment, IL.location ...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Install-DbaReports.ps1
Install-DbaReports.ps1
Function Install-DbaReports { <# .SYNOPSIS Installs both the server and client components for dbareports. To install only the client component, use Install-DbaReportsClient. .DESCRIPTION Installs the following on the specified SQL server: Database with all required tables, stored pro...
PowerShellCorpus/PowerShellGallery/dbareports/0.2.54/functions/Get-DbrSqlVersion.ps1
Get-DbrSqlVersion.ps1
Function Get-DbrSqlVersion { <# .SYNOPSIS .DESCRIPTION .PARAMETER .PARAMETER .PARAMETER .NOTES dbareports PowerShell module (https://dbareports.io, SQLDBAWithABeard.com) Copyright (C) 2016 Rob Sewell This program is free software: you can redistribute it and/or modify it under the terms of the GNU Genera...
PowerShellCorpus/PowerShellGallery/x7Zip/1.0.8/Example/Sample_x7Zip.ps1
Sample_x7Zip.ps1
# Powershell DSC Configuration Script for installing 7-Zip versions 15.05, 9.38, and 9.20. This Configuration Script supports both 32-bit and 64-bit architectures for all 3 versions. # Vasken Houdoverdov # # Each of these calls to Sample_Install7zip will generate a MOF file which can be fed into Start-DscConfigurati...
PowerShellCorpus/PowerShellGallery/ObjectiveGit/1.7/Set-Branch.ps1
Set-Branch.ps1
function Set-Branch { <# .Synopsis Switch branches .Description Updates files in the working tree to match the version in the specified tree. .Parameter Branch Branch to checkout .Parameter Repository Path to the git repository. Can be relative or absolute. If not specified defaults to ...