forked from dsccommunity/SqlServerDsc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SqlScript, SqlScriptQuery: Add support for disable variables parameter (
dsccommunity#1578) - SqlScript - Added the DisableVariables parameter (issue dsccommunity#1422). - SqlScriptQuery - Added the DisableVariables parameter (issue dsccommunity#1422).
- Loading branch information
Showing
12 changed files
with
558 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
source/Examples/Resources/SqlScript/4-RunScriptUsingDisabledVariables.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<# | ||
.DESCRIPTION | ||
This example shows how to run SQL script with disabled variables. | ||
#> | ||
|
||
Configuration Example | ||
{ | ||
param | ||
( | ||
[Parameter(Mandatory = $true)] | ||
[System.Management.Automation.PSCredential] | ||
$SqlCredential | ||
) | ||
|
||
Import-DscResource -ModuleName 'SqlServerDsc' | ||
|
||
Node localhost | ||
{ | ||
SqlScript 'RunWithDisabledVariables' | ||
{ | ||
ServerName = 'localhost' | ||
InstanceName = 'SQL2016' | ||
Credential = $SqlCredential | ||
|
||
SetFilePath = 'C:\DSCTemp\SQLScripts\Set-RunSQLScript.sql' | ||
TestFilePath = 'C:\DSCTemp\SQLScripts\Test-RunSQLScript.sql' | ||
GetFilePath = 'C:\DSCTemp\SQLScripts\Get-RunSQLScript.sql' | ||
DisableVariables = $true | ||
} | ||
} | ||
} |
Oops, something went wrong.