Public/Close-PdqSqlConnection.ps1
<#
.SYNOPSIS Closes a SimplySql connection that Open-PdqSqlConnection opened. .INPUTS None. .OUTPUTS None. .EXAMPLE Close-PdqSqlConnection -Product 'Inventory' #> function Close-PdqSqlConnection { [CmdletBinding()] param ( [ValidateSet('Deploy', 'Inventory')] # The PDQ application you would like to execute this function against. [String]$Product, # Whether or not the connection should be closed. # This is to reduce the number of lines of code in functions that rely on this function. [Bool]$CloseConnection ) if ( $CloseConnection ) { Close-SqlConnection -ConnectionName $Product } } |