< Back

Publish-SsisVariables

Fri Jan 10, 2020 9:07 pm

NAME Publish-SsisVariables



SYNOPSIS

Publish and associate variables in publish json file to corresponding environment and project.





SYNTAX

Publish-SsisVariables [-jsonPsCustomObject] <PSObject> [-sqlConnection] <SqlConnection> [[-ssisFolderName]

<String>] [[-ssisEnvironmentName] <String>] [[-ssisProjectName] <String>] [[-localVariables]] [[-whatIf]]

[[-variableType] <String>] [<CommonParameters>]





DESCRIPTION

For each environment variable in json file, function checks if variable already exists.

If it does not exist then it creates it.

If it does exist then it checks if any of hte following have altered:

value

dataType

Sensitivity

description

If any of these have changed it alters those values only.

If both data type and value have changed, then current var is dropped and re-created, as blocking changes.

Functionality to create/alter are in separate functions:

new-ssisvariable

set-environmentvariableproperty

set-environmentvariableprotection

set-environmentvariablevalue





PARAMETERS

-jsonPsCustomObject <PSObject>

Tested json object loaded from Import-Json



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-sqlConnection <SqlConnection>

The SQL Connection to SSISDB



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ssisFolderName <String>

Optional parameter. We may wish to override the value of what is in the json file.



Required? false

Position? 3

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ssisEnvironmentName <String>

Optional parameter. We may wish to override the value of what is in the json file.



Required? false

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ssisProjectName <String>

Optional parameter. We may wish to override the value of what is in the json file.



Required? false

Position? 5

Default value

Accept pipeline input? false

Accept wildcard characters? false



-localVariables [<SwitchParameter>]

Optional parameter. If used then values stored in json file are used. If not used then PowerShell variables

need to exist either

as full PS variables (e.g. $Foo) or Environment variables (e.g. $Env:Foo) that have the same name as variables

in json file.



Required? false

Position? 6

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-whatIf [<SwitchParameter>]

Optional parameter. If used then no changes are made on server.



Required? false

Position? 7

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-variableType <String>

Variables can be either full Powershell variables (e.g. $Foo) or Environment variables (e.g. $Env:Foo).



Required? false

Position? 8

Default value PS

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Publish-SsisVariables -ssisPublishFilePath $thisSsisPublishFilePath -sqlConnection $ssisdb -localVariables



Non-mandatory params here can be used to overwrite the values stored in the publish json file passed in











RELATED LINKS