source
stringclasses
1 value
repo
stringclasses
33 values
repo_url
stringclasses
33 values
path
stringlengths
7
179
language
stringclasses
1 value
license
stringclasses
4 values
stars
int64
2.27k
53.4k
ref
stringclasses
4 values
size_bytes
int64
48
259k
text
stringlengths
48
259k
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Connect-ReplicationDB.ps1
PowerShell
mit
2,763
development
529
#Helper Function function Connect-ReplicationDB { param ( [object]$Server, [object]$Database, [switch]$EnableException ) Add-ReplicationLibrary $repDB = New-Object Microsoft.SqlServer.Replication.ReplicationDatabase $repDB.Name = $Database.Name $repDB.ConnectionContext...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-SQLInstanceComponent.ps1
PowerShell
mit
2,763
development
16,566
function Get-SQLInstanceComponent { <# .SYNOPSIS Retrieves SQL server information from a local or remote servers. .DESCRIPTION Retrieves SQL server information from a local or remote servers. Pulls all instances from a SQL server and detects if in a cluster or not. .PARAMETER Com...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Send-File.ps1
PowerShell
mit
2,763
development
5,410
function Send-File { <# .SYNOPSIS This function sends a file (or folder of files recursively) to a destination WinRm session. This function was originally built by Lee Holmes (http://poshcode.org/2216) but has been modified to recursively send folders of files as well as to support UNC p...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Join-SomePath.ps1
PowerShell
mit
2,763
development
327
function Join-SomePath { <# An internal command that does not require the local path to exist Boo, this does not work, but keeping it for future ref. #> [CmdletBinding()] param ( [string]$Path, [string]$ChildPath ) process { [IO.Path]::Combine($Path, $ChildPath) ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/New-DbaLogShippingPrimarySecondary.ps1
PowerShell
mit
2,763
development
6,256
function New-DbaLogShippingPrimarySecondary { <# .SYNOPSIS New-DbaLogShippingPrimarySecondary adds an entry for a secondary database. .DESCRIPTION New-DbaLogShippingPrimarySecondary adds an entry for a secondary database. This is executed on the primary server. ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-SaLoginName.ps1
PowerShell
mit
2,763
development
947
function Get-SaLoginName { <# .SYNOPSIS Gets the login matching the standard "sa" user .DESCRIPTION Gets the login matching the standard "sa" user, useful in case of renames .PARAMETER SqlInstance The SQL Server instance. .PARAMETER SqlCredential Allows you to login to servers usi...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Add-ReplicationLibrary.ps1
PowerShell
mit
2,763
development
753
function Add-ReplicationLibrary { param( [switch]$EnableException ) try { $script:libraryroot = Get-DbatoolsLibraryPath $platformlib = Join-DbaPath -Path $script:libraryroot -ChildPath lib $repdll = Join-DbaPath -Path $platformlib -ChildPath Microsoft.SqlServer.Replication.dl...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Resolve-SqlIpAddress.ps1
PowerShell
mit
2,763
development
423
function Resolve-SqlIpAddress { [CmdletBinding()] param ( [Parameter(Mandatory)] [object]$SqlInstance, [PSCredential]$SqlCredential ) $server = Connect-DbaInstance -SqlInstance $SqlInstance -SqlCredential $SqlCredential $servernetbios = $server.ComputerNamePhysicalNetBIOS ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-Language.ps1
PowerShell
mit
2,763
development
822
function Get-Language { <# .SYNOPSIS Converts Microsoft's language ID to human readable format .DESCRIPTION Converts Microsoft's language ID to human readable format .PARAMETER Id The language ID .EXAMPLE Get-Language 1033 ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Invoke-TlsRestMethod.ps1
PowerShell
mit
2,763
development
772
function Invoke-TlsRestMethod { <# Internal utility that mimics invoke-RestMethod but enables all tls available version rather than the default, which on a lot of standard installations is just TLS 1.0 #> $currentVersionTls = [Net.ServicePointManager]::SecurityProtocol $currentSupportabl...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Set-ServiceStartMode.ps1
PowerShell
mit
2,763
development
2,606
function Set-ServiceStartMode { <# .SYNOPSIS Internal function. Implements the method that changes startup mode of the SQL Server service. .DESCRIPTION Accepts objects from Get-DbaService and performs a corresponding action. .PARAMETER InputObject A collection of se...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-RegServerParent.ps1
PowerShell
mit
2,763
development
437
function Get-RegServerParent { [cmdletbinding()] param ( [object]$InputObject ) process { $parentcount = 0 do { if ($null -ne $InputObject.Parent) { $InputObject = $InputObject.Parent } } until ($null -ne $InputObject.Server...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Invoke-TagCommand.ps1
PowerShell
mit
2,763
development
3,135
function Invoke-TagCommand ([string]$Tag, [string]$Keyword) { <# .SYNOPSIS An internal command, feel free to ignore. .EXAMPLE Tag-Command -Tag Restore -Keyword Restore Tag-Command -Tag Backup -Keyword Backup Tag-Command -Tag Orphan -Keyword Orphan Tag-Command -Tag DisasterRecovery -Keyword Atta...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-DecryptedObject.ps1
PowerShell
mit
2,763
development
8,025
function Get-DecryptedObject { <# .SYNOPSIS Internal function. .DESCRIPTION Decrypts credentials or linked server passwords from a SQL Server instance using the service master key. This is necessary because SQL Server does not allow retrieval of plaintext passwords for security reas...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Resolve-IpAddress.ps1
PowerShell
mit
2,763
development
605
function Resolve-IpAddress { # Uses the Beard's method to resolve IPs [CmdletBinding()] param ( [Parameter(Mandatory)] [Alias("ServerInstance", "SqlInstance", "ComputerName", "SqlServer")] [object]$Server ) $ping = New-Object System.Net.NetworkInformation.Ping $timeout = ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Compare-DbaCollationSensitiveObject.ps1
PowerShell
mit
2,763
development
4,524
<# .SYNOPSIS Filters InputObject, Compares a property to value(s) using a given sql server collation .DESCRIPTION The Compare-DbaCollationSensitiveObject command filters an Inputobject using a string comparer builder provided by the SMO, for a given sql server collation. .PARAMETER InputOb...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/New-SqlConnection.ps1
PowerShell
mit
2,763
development
418
function New-SqlConnection { <# Created for commands that require System.Data.SqlClient SQL Connections, like the replication commands #> param( [string]$SqlInstance, [PSCredential]$SqlCredential ) $connstring = (New-DbaConnectionString -SqlInstance $SqlInstance -SqlCredent...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Test-SqlQueryComplete.ps1
PowerShell
mit
2,763
development
656
function Test-SqlQueryComplete { param ( [Alias("SqlInstance", "SqlServer")] [object]$server, [string]$sql, [switch]$checkpid ) if ($checkpid) { $sqlpid = " and session_id = $sqlpid" } $sqlpid = $server.ConnectionContext.ProcessID $sqlpid = " and session...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Start-DbccCheck.ps1
PowerShell
mit
2,763
development
3,773
function Start-DbccCheck { [CmdletBinding(SupportsShouldProcess)] param ( [object]$server, [string]$DbName, [switch]$table, [int]$MaxDop, [switch]$DetailedOutput ) $servername = $server.name $escapedDbName = $DbName.Replace("]", "]]") if ($Pscmdlet.Shoul...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Invoke-TlsWebRequest.ps1
PowerShell
mit
2,763
development
1,919
function Invoke-TlsWebRequest { <# Internal utility that mimics invoke-webrequest but enables all tls available version rather than the default, which on a lot of standard installations is just TLS 1.0 #> $currentVersionTls = [Net.ServicePointManager]::SecurityProtocol $currentSupporta...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/ConvertFrom-SecurePass.ps1
PowerShell
mit
2,763
development
417
Function ConvertFrom-SecurePass { # Decrypt passwords on Linux, Windows and OSX #https://github.com/PowerShell/PowerShell/issues/13494#issuecomment-678150857 [CmdletBinding()] param( [Parameter(ValueFromPipeline)] [System.Security.SecureString]$InputObject ) process { (Ne...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-DbaSqlPackagePath.ps1
PowerShell
mit
2,763
development
5,298
function Get-DbaSqlPackagePath { <# .SYNOPSIS Gets the path to SqlPackage.exe, checking installed versions and bundled versions. .DESCRIPTION This function implements the logic to find SqlPackage.exe by: 1. First checking if SqlPackage is available via Get-Command (system PATH) ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-DbaPathSep.ps1
PowerShell
mit
2,763
development
300
function Get-DbaPathSep { <# Gets the instance path separator, if exists, or return the default one #> [CmdletBinding()] param ( [object]$Server ) $pathSep = $Server.PathSeparator if ($pathSep.Length -eq 0) { $pathSep = '\' } return $pathSep }
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-SqlServerTlsCertificate.ps1
PowerShell
mit
2,763
development
17,621
# Source: https://gist.github.com/jborean93/44f92e4dfa613c5a1e7889fa7a7c2563 # Copyright: (c) 2023, Jordan Borean (@jborean93) <jborean93@gmail.com> # MIT License (see LICENSE or https://opensource.org/licenses/MIT) Function Get-SqlServerTlsCertificate { <# .SYNOPSIS Gets the MS SQL X509 Certificate. ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-JobList.ps1
PowerShell
mit
2,763
development
4,825
function Get-JobList { <# .SYNOPSIS Helper function to get SQL Agent jobs. .DESCRIPTION Helper function to get all SQL Agent jobs or provide filter .PARAMETER SqlInstance SQL Server instance .PARAMETER SqlCredential Credential to use if SqlInstance did not include it....
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Convert-DbaTimelineStatusColor.ps1
PowerShell
mit
2,763
development
1,523
function Convert-DbaTimelineStatusColor { <# .SYNOPSIS Converts literal string status to a html color .DESCRIPTION This function acceptes Agent Job status as literal string input and covnerts to html color. This is internal function, part of ConvertTo-DbaTimeline...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-BulkRowsCopiedCount.ps1
PowerShell
mit
2,763
development
1,359
function Get-BulkRowsCopiedCount { <# .SYNOPSIS Gets the number of rows returned by a sql bulk copy .DESCRIPTION Uses reflection to return the _rowsCopied private field value from a SqlBulkCopy object see http://stackoverflow.com/questions/1188384/sqlbulkcopy-row...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Test-DbaLsnChain.ps1
PowerShell
mit
2,763
development
6,363
function Test-DbaLsnChain { <# .SYNOPSIS Checks that a filtered array from Get-FilteredRestore contains a restorabel chain of LSNs .DESCRIPTION Finds the anchoring Full backup (or multiple if it's a striped set). Then filters to ensure that all the backups are from that anchor point...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Invoke-Command2.ps1
PowerShell
mit
2,763
development
7,452
function Invoke-Command2 { <# .SYNOPSIS Wrapper function that calls Invoke-Command and gracefully handles credentials. .DESCRIPTION Wrapper function that calls Invoke-Command and gracefully handles credentials. .PARAMETER ComputerName Default: $env:COMPU...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-DbaHelp.ps1
PowerShell
mit
2,763
development
18,071
function Get-DbaHelp { <# .SYNOPSIS Massages inline help data to a more useful format .DESCRIPTION Takes the inline help and outputs a more usable object .PARAMETER Name The function/command to extract help from .PARAMETER OutputAs Output format (raw PSObject or MD...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Initialize-CredSSP.ps1
PowerShell
mit
2,763
development
4,156
function Initialize-CredSSP { <# .SYNOPSIS Configure local and remote computers to use Credssp protocol .DESCRIPTION Enables both local and remote machine to participate in a Credssp session. Local computer will be told to trust the Delegate (remote) computer. Remote compute...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Update-SqlDbOwner.ps1
PowerShell
mit
2,763
development
3,008
function Update-SqlDbOwner { <# .SYNOPSIS Internal function. Updates specified database dbowner. #> [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] [CmdletBinding(SupportsShouldProcess)] param ( [Parameter(Mandatory)] ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/New-DbaLogShippingSecondaryPrimary.ps1
PowerShell
mit
2,763
development
17,552
function New-DbaLogShippingSecondaryPrimary { <# .SYNOPSIS New-DbaLogShippingPrimarySecondary sets up the primary information for the primary database. .DESCRIPTION New-DbaLogShippingPrimarySecondary sets up the primary information, adds local and remote monitor links, ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Remove-InvalidFileNameChars.ps1
PowerShell
mit
2,763
development
379
Function Remove-InvalidFileNameChars { param( [Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName)] [String]$Name ) $invalidChars = [IO.Path]::GetInvalidFileNameChars() -join '' $re = "[{0}]" -f [RegE...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Invoke-ManagedComputerCommand.ps1
PowerShell
mit
2,763
development
4,789
function Invoke-ManagedComputerCommand { <# .SYNOPSIS Runs wmi commands against a target system. .DESCRIPTION Runs wmi commands against a target system. Either directly or over PowerShell remoting. .PARAMETER ComputerName The target to run ag...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-XPlatVariable.ps1
PowerShell
mit
2,763
development
48
function Get-XPlatVariable { $script:xplat }
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Disconnect-Regserver.ps1
PowerShell
mit
2,763
development
241
function Disconnect-Regserver ($Server) { $i = 0 do { $server = $server.Parent } until ($null -ne $server.ServerConnection -or $i++ -gt 20) if ($server.ServerConnection) { $server.ServerConnection.Disconnect() } }
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Convert-ByteToHexString.ps1
PowerShell
mit
2,763
development
958
function Convert-ByteToHexString { <# .SYNOPSIS Converts byte object into hex string .DESCRIPTION Converts byte object ([byte[]]@(1,100,23,54)) into the hex string (e.g. '0x01641736') Used when working with SMO logins and their byte parameters: sids and hashed passwords .PARAMETER InputObj...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Add-PbmLibrary.ps1
PowerShell
mit
2,763
development
571
function Add-PbmLibrary { param( [switch]$EnableException ) try { $platformlib = Join-DbaPath -Path $script:libraryroot -ChildPath lib $dmfdll = Join-DbaPath -Path $platformlib -ChildPath Microsoft.SqlServer.Dmf.dll $dmfcommon = Join-DbaPath -Path $platformlib -ChildPath Micr...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Import-DbaCmdlet.ps1
PowerShell
mit
2,763
development
3,864
function Import-DbaCmdlet { <# .SYNOPSIS Loads a cmdlet into the current context. .DESCRIPTION Loads a cmdlet into the current context. This can be used to register a cmdlet during module import, making it easy to have hybrid modules publishing both cmdlets and functions. Ca...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-PasswordHash.ps1
PowerShell
mit
2,763
development
2,612
function Get-PasswordHash { <# .SYNOPSIS Generates a password hash for SQL Server login .DESCRIPTION Generates a hash string based on the plaintext or securestring password and a SQL Server version. Salt is optional .PARAMETER Password Either plain text or Securestring password .PARAM...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-LoginPasswordHash.ps1
PowerShell
mit
2,763
development
3,114
function Get-LoginPasswordHash { <# .SYNOPSIS Internal function. Gets the hashed password value for a SQL Server login. .DESCRIPTION Retrieves the hashed password value for SQL Server logins using the same technique as Microsoft's sp_help_revlogin stored procedure. This allows passw...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-SqlInstanceUpdate.ps1
PowerShell
mit
2,763
development
9,477
function Get-SqlInstanceUpdate { <# Originally based on https://github.com/adbertram/PSSqlUpdater Internal function. Provides information on the target update version for a specific set of SQL Server instances based on current and target SQL Server levels. Component parameter is using the output object ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Register-RemoteSessionConfiguration.ps1
PowerShell
mit
2,763
development
3,384
function Register-RemoteSessionConfiguration { <# .SYNOPSIS Registers a PSSessionConfiguration on a remote machine .DESCRIPTION Registers a session with a custom credentials on a remote machine through WinRM. Designed to overcome the double-hop issue and as an alternative to CredSSP ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-AdjustedTotalRowsCopied.ps1
PowerShell
mit
2,763
development
2,295
function Get-AdjustedTotalRowsCopied { <# .SYNOPSIS The legacy bulk copy library still uses a 4 byte integer to track the number of rows copied. That 4 byte integer is subject to overflow/wraparound if the number of rows copied is greater than an integer can support. The SqlRowsCopiedEventArgs.R...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Get-DbaDbPhysicalFile.ps1
PowerShell
mit
2,763
development
1,708
function Get-DbaDbPhysicalFile { <# .SYNOPSIS Gets raw information about physical files linked to databases .DESCRIPTION Fastest way to fetch just the paths of the physical files for every database on the instance, also for offline databases. Incidentally, it also fetches the paths for MMO and ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/Remove-TeppCacheItem.ps1
PowerShell
mit
2,763
development
2,017
function Remove-TeppCacheItem { <# .SYNOPSIS Internal function to remove an item from the TEPP cache. .DESCRIPTION Internal function to remove an item from the TEPP cache. .PARAMETER SqlInstance The SQL Server instance. .PARAMETER Type The type of object. Must be p...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/New-DbaCimSessionOptionWithTimeout.ps1
PowerShell
mit
2,763
development
1,774
function New-DbaCimSessionOptionWithTimeout { <# .SYNOPSIS Creates CIM session options with a configured operation timeout. .DESCRIPTION Internal helper function that creates CIM session options (WSManSessionOptions or DComSessionOptions) with the operation timeout configured from C...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/utility/Hide-ConnectionString.ps1
PowerShell
mit
2,763
development
467
function Hide-ConnectionString { [CmdletBinding()] Param ( [string]$ConnectionString ) try { $connStringBuilder = New-Object Microsoft.Data.SqlClient.SqlConnectionStringBuilder $ConnectionString if ($connStringBuilder.Password) { $connStringBuilder.Password = ''.Padle...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Test-Bound.ps1
PowerShell
mit
2,763
development
2,915
function Test-Bound { <# .SYNOPSIS Helper function that tests if a parameter was bound. .DESCRIPTION Helper function that tests if one or more parameters was bound. .PARAMETER ParameterName The name(s) of the parameter that is tested for being bound. By default, the che...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Test-PsVersion.ps1
PowerShell
mit
2,763
development
1,877
function Test-PsVersion { <# .SYNOPSIS Internal tool, used to detect the version of PowerShell .DESCRIPTION We still support PS3 and as future continues we will have to maintain code base for PS3 and code base for newer versions of PowerShell. This is just easier function to...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Test-DbaDeprecation.ps1
PowerShell
mit
2,763
development
4,819
function Test-DbaDeprecation { <# .SYNOPSIS Tests whether a function or one of its parameters was called by a bad name. .DESCRIPTION Tests whether a function or one of its parameters was called by a bad name. This allows giving deprecation warnings - once per ses...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Invoke-Parallel.ps1
PowerShell
mit
2,763
development
26,975
function Invoke-Parallel { <# .SYNOPSIS Function to control parallel processing using runspaces .DESCRIPTION Function to control parallel processing using runspaces Note that each runspace will not have access to variables and commands loaded in your session or in other runspac...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Test-ElevationRequirement.ps1
PowerShell
mit
2,763
development
4,130
function Test-ElevationRequirement { <# .SYNOPSIS Command that tests, whether the process runs elevated and has to run as such. .DESCRIPTION Command that tests, whether the process runs elevated and has to run as such. Some commands require to be run elevated, wh...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Test-Windows.ps1
PowerShell
mit
2,763
development
721
function Test-Windows { <# .SYNOPSIS Internal tool, used to detect non-Windows platforms .DESCRIPTION Some things don't work with Windows, this is an easy way to detect .EXAMPLE if (-not (Test-Windows)) { return } The calling function will s...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Invoke-SteppablePipeline.ps1
PowerShell
mit
2,763
development
762
function Invoke-SteppablePipeline { <# .SYNOPSIS Allows using steppable pipelines on the pipeline. .DESCRIPTION Allows using steppable pipelines on the pipeline. .PARAMETER InputObject The object(s) to process Should only receive input from the pipeline! .PARAMETER...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Stop-Function.ps1
PowerShell
mit
2,763
development
12,015
function Stop-Function { <# .SYNOPSIS Function that interrupts a function. .DESCRIPTION Function that interrupts a function. This function is a utility function used by other functions to reduce error catching overhead. It is designed to allow gracefully terminating a funct...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/flowcontrol/Test-FunctionInterrupt.ps1
PowerShell
mit
2,763
development
1,242
function Test-FunctionInterrupt { <# .SYNOPSIS Internal tool, used to gracefully interrupt a function. .DESCRIPTION This helper function is designed to work in tandem with Stop-Function. When gracefully terminating a function, there is a major issue: ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/tabcompletion/Register-DbaTeppScriptBlock.ps1
PowerShell
mit
2,763
development
1,092
function Register-DbaTeppScriptblock { <# .SYNOPSIS Registers a scriptblock under name, to later be available for TabExpansion. .DESCRIPTION Registers a scriptblock under name, to later be available for TabExpansion. .PARAMETER ScriptBlock The scriptbloc...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/tabcompletion/Register-DbaTeppInstanceCacheBuilder.ps1
PowerShell
mit
2,763
development
2,289
function Register-DbaTeppInstanceCacheBuilder { <# .SYNOPSIS Registers a scriptblock used to build the TEPP cache from an instance connection. .DESCRIPTION Registers a scriptblock used to build the TEPP cache from an instance connection. Used only on import of th...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/tabcompletion/New-DbaTeppCompletionResult.ps1
PowerShell
mit
2,763
development
2,975
function global:New-DbaTeppCompletionResult { <# .SYNOPSIS Generates a completion result for dbatools internal tab completion. .DESCRIPTION Generates a completion result for dbatools internal tab completion. .PARAMETER CompletionText The text to propose....
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/tabcompletion/Register-DbaTeppArgumentCompleter.ps1
PowerShell
mit
2,763
development
3,400
function Register-DbaTeppArgumentCompleter { <# .SYNOPSIS Registers a parameter for a prestored Tepp. .DESCRIPTION Registers a parameter for a prestored Tepp. This function allows easily registering a function's parameter for Tepp in the function-file, rather tha...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/configuration/Read-DbatoolsConfigPersisted.ps1
PowerShell
mit
2,763
development
7,335
function Read-DbatoolsConfigPersisted { <# .SYNOPSIS Reads configurations from persisted file / registry. .DESCRIPTION Reads configurations from persisted file / registry. .PARAMETER Scope Where to read from. .PARAMETER Module Load module specific data. Use...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/configuration/Write-DbatoolsConfigFile.ps1
PowerShell
mit
2,763
development
2,207
function Write-DbatoolsConfigFile { <# .SYNOPSIS Handles config export to file. .DESCRIPTION Handles config export to file. .PARAMETER Config The configuration items to export. .PARAMETER Path The path to export to. Needs to point to the specific file to export...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/configuration/Read-DbatoolsConfigFile.ps1
PowerShell
mit
2,763
development
3,162
function Read-DbatoolsConfigFile { <# .SYNOPSIS Reads a configuration file and parses it. .DESCRIPTION Reads a configuration file and parses it. .PARAMETER Path The path to the file to parse. .PARAMETER WebLink The link to a website to download straight as raw json...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/configuration/Register-DbatoolsConfigValidation.ps1
PowerShell
mit
2,763
development
1,628
function Register-DbatoolsConfigValidation { <# .SYNOPSIS Registers a validation scriptblock for use with the configuration system. .DESCRIPTION Registers a validation scriptblock for use with the configuration system. The scriptblock must be designed according ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/runspaces/Register-DbaRunspace.ps1
PowerShell
mit
2,763
development
3,098
function Register-DbaRunspace { <# .SYNOPSIS Registers a scriptblock to run in the background. .DESCRIPTION This function registers a scriptblock to run in separate runspace. This is different from most runspace solutions, in that it is designed for permanent background tasks that n...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/runspaces/Start-DbaRunspace.ps1
PowerShell
mit
2,763
development
2,868
function Start-DbaRunspace { <# .SYNOPSIS Starts a managed runspace .DESCRIPTION Starts a runspace that was registered to dbatools Simply registering does not automatically start a given runspace. Only by executing this function will it take effect. .PARAMETER Name The ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/runspaces/Stop-DbaRunspace.ps1
PowerShell
mit
2,763
development
3,392
function Stop-DbaRunspace { <# .SYNOPSIS Stops a managed runspace .DESCRIPTION Stops a runspace that was registered to dbatools. Will not cause errors if the runspace is already halted. Runspaces may not automatically terminate immediately when calling this function. ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/runspaces/Register-DbaMaintenanceTask.ps1
PowerShell
mit
2,763
development
4,380
function Register-DbaMaintenanceTask { <# .SYNOPSIS Allows scheduling maintenance tasks, that are perfomed in the background. .DESCRIPTION Allows scheduling maintenance tasks, that are perfomed in the background. All scriptblocks scheduled like this will be perf...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/runspaces/Get-DbaRunspace.ps1
PowerShell
mit
2,763
development
711
function Get-DbaRunspace { <# .SYNOPSIS Returns registered runspaces. .DESCRIPTION Returns a list of runspaces that have been registered with dbatools .PARAMETER Name Default: "*" Only registered runspaces of similar names are returned. .EXAMPLE PS C:\> Get...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Get-DbaMessageLevelModifier.ps1
PowerShell
mit
2,763
development
955
function Get-DbaMessageLevelModifier { <# .SYNOPSIS Returns all registered message level modifiers with similar name. .DESCRIPTION Returns all registered message level modifiers with similar name. Message level modifiers are created using New-DbaMessageLevelModifier and allow dynam...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Convert-DbaMessageException.ps1
PowerShell
mit
2,763
development
2,572
function Convert-DbaMessageException { <# .SYNOPSIS Transforms the Exception input to the message system. .DESCRIPTION Transforms the Exception input to the message system. If there is an exception running a transformation scriptblock, it will log the error in the transform error q...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Remove-DbaMessageLevelModifier.ps1
PowerShell
mit
2,763
development
2,487
function Remove-DbaMessageLevelModifier { <# .SYNOPSIS Removes a message level modifier. .DESCRIPTION Removes a message level modifier. Message Level Modifiers can be created by using New-DbaMessageLevelModifier. They are used to emphasize or deemphasize messages, in order ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/New-DbaMessageLevelModifier.ps1
PowerShell
mit
2,763
development
4,658
function New-DbaMessageLevelModifier { <# .SYNOPSIS Allows modifying message levels by powerful filters. .DESCRIPTION Allows modifying message levels by powerful filters. This is designed to allow a developer to have more control over what is written how during the development proc...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Write-HostColor.ps1
PowerShell
mit
2,763
development
56
function Write-HostColor { param () process {} }
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Register-DbaMessageEvent.ps1
PowerShell
mit
2,763
development
4,485
function Register-DbaMessageEvent { <# .SYNOPSIS Registers an event to when a message is written. .DESCRIPTION Registers an event to when a message is written. These events will fire whenever the written message fulfills the specified filter criteria. This allows integratin...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Register-DbaMessageTransform.ps1
PowerShell
mit
2,763
development
5,786
function Register-DbaMessageTransform { <# .SYNOPSIS Registers a scriptblock that can transform message content. .DESCRIPTION Registers a scriptblock that can transform message content. This can be used to convert some kinds of input. Specifically: Target: When spec...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Convert-DbaMessageLevel.ps1
PowerShell
mit
2,763
development
2,426
function Convert-DbaMessageLevel { <# .SYNOPSIS Processes the effective message level of a message .DESCRIPTION Processes the effective message level of a message - Applies level decrements - Applies message level modifiers .PARAMETER OriginalLevel The level the...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/functions/message/Convert-DbaMessageTarget.ps1
PowerShell
mit
2,763
development
2,491
function Convert-DbaMessageTarget { <# .SYNOPSIS Transforms the target input to the message system. .DESCRIPTION Transforms the target input to the message system. If there is an exception running a transformation scriptblock, it will log the error in the transform error queue and ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/setagentschedule.ps1
PowerShell
mit
2,763
development
773
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["setagentschedule"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["setagentschedule"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $pa...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/mailaccount.ps1
PowerShell
mit
2,763
development
2,027
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["mailaccount"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["mailaccount"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterNa...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/config.ps1
PowerShell
mit
2,763
development
1,943
#region Tepp Data return: FullName $ScriptBlock = { param ( $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter ) foreach ($name in ([Dataplat.Dbatools.Configuration.ConfigurationHost]::Configurations.Values | Where-Object { -not $_.H...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/jobcategory.ps1
PowerShell
mit
2,763
development
2,037
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["jobcategory"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["jobcategory"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterNa...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/operatorcategory.ps1
PowerShell
mit
2,763
development
2,077
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["operatorcategory"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["operatorcategory"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $p...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/configname.ps1
PowerShell
mit
2,763
development
2,132
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["configname"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["configname"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterName...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/endpoint.ps1
PowerShell
mit
2,763
development
2,045
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["endpoint"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["endpoint"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterName, ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/schedule.ps1
PowerShell
mit
2,763
development
2,018
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["schedule"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["schedule"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterName, ...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/xesessiontemplate.ps1
PowerShell
mit
2,763
development
663
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["xesessiontemplate"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["xesessiontemplate"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/mailserver.ps1
PowerShell
mit
2,763
development
2,032
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["mailserver"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["mailserver"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterName...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/mailprofile.ps1
PowerShell
mit
2,763
development
2,027
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["mailprofile"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["mailprofile"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterNa...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/newagentschedule.ps1
PowerShell
mit
2,763
development
752
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["newagentschedule"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["newagentschedule"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $pa...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/job.ps1
PowerShell
mit
2,763
development
1,967
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["job"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["job"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterName, $word...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/alertcategory.ps1
PowerShell
mit
2,763
development
2,053
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["alertcategory"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["alertcategory"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $paramet...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/backupdevice.ps1
PowerShell
mit
2,763
development
2,034
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["backupdevice"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["backupdevice"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameter...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/path.ps1
PowerShell
mit
2,763
development
620
#region Tepp Data return: Path $ScriptBlock = { param ( $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter ) foreach ($name in (([Dataplat.Dbatools.Configuration.ConfigurationHost]::Configurations.Values | Where-Object FullName -like...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/servertrigger.ps1
PowerShell
mit
2,763
development
2,036
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["servertrigger"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["servertrigger"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $paramet...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/perfmontemplate.ps1
PowerShell
mit
2,763
development
676
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["perfmontemplate"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["perfmontemplate"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $para...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/processProgram.ps1
PowerShell
mit
2,763
development
933
$scriptBlock = { param ( $commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter ) $server = $fakeBoundParameter['SqlInstance'] if (-not $server) { return } $sqlCredential = $fakeBoundParameter['SqlCredential'] tr...
github
dataplat/dbatools
https://github.com/dataplat/dbatools
private/dynamicparams/login.ps1
PowerShell
mit
2,763
development
1,973
#region Initialize Cache if (-not [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["login"]) { [Dataplat.Dbatools.TabExpansion.TabExpansionHost]::Cache["login"] = @{ } } #endregion Initialize Cache #region Tepp Data return $ScriptBlock = { param ( $commandName, $parameterName, $...