< Back

Invoke-DevartFormatScript

Mon Jan 13, 2020 7:06 pm

NAME Invoke-DevartFormatScript



SYNOPSIS

Formats the SQL files.





SYNTAX

Invoke-DevartFormatScript -Source <object> [-Connection <object>] [-Encoding <string>] [-FileExtension <string>]

[-IncludeSubfolders <SwitchParameter>] [-Output <string>] [-Profile <string>] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-Source <object>

Specifies the source SQL file or a folder with the files to be formatted.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Connection <object>

The DevartDatabaseConnectionInfo or connection string.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Encoding <string>

Specifies the encoding which should be applied to open and save files.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-FileExtension <string>

Specifies the extension of the sourcefolder files that will be formatted.



The .sql extension is chosen by default.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-IncludeSubfolders <SwitchParameter>

Include the current directory and all subdirectories in search operation.



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Profile <string>

Specifies the path to file that contains formatting options settings.



If the parameter is not specified, default formatting options settings will be applied.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Output <string>

Specifies the output file or path name where formatting results will be saved.



If the parameter is not specified, the formatting results will be saved in the source file or folder.



Required? false

Position? named

Default value

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

System.Boolean





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



Invoke-DevartFormatScript -Source "C:\\Temp\\actor.sql" -Output "C:\\Temp\\new_actor.sql"





RELATED LINKS

Online help:

https://docs.devart.com/devops-automati ... cript.html