Skip to content

Latest commit

 

History

History
242 lines (177 loc) · 4.21 KB

Format-BicepFile.md

File metadata and controls

242 lines (177 loc) · 4.21 KB
external help file Module Name online version schema
Bicep-help.xml
Bicep
2.0.0

Format-BicepFile

SYNOPSIS

Format one or several Bicep files.

SYNTAX

Default (Default)

Format-BicepFile [[-Path] <String>] [[-NewlineOption] <String>] [[-IndentKindOption] <String>]
 [[-IndentSize] <Int32>] [-InsertFinalNewline] [-WhatIf] [-Confirm]
 [<CommonParameters>]

OutputPath

Format-BicepFile [[-Path] <String>] [[-OutputPath] <String>] [[-NewlineOption] <String>]
 [[-IndentKindOption] <String>] [[-IndentSize] <Int32>] [-InsertFinalNewline]
 [-WhatIf] [-Confirm] [<CommonParameters>]

OutputDirectory

Format-BicepFile [[-Path] <String>] [[-OutputDirectory] <String>] [[-NewlineOption] <String>]
 [[-IndentKindOption] <String>] [[-IndentSize] <Int32>] [-InsertFinalNewline]
 [-WhatIf] [-Confirm] [<CommonParameters>]

AsString

Format-BicepFile [[-Path] <String>] [[-NewlineOption] <String>] [[-IndentKindOption] <String>]
 [[-IndentSize] <Int32>] [-InsertFinalNewline] [-AsString] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Format one or several Bicep files.

EXAMPLES

Example 1

PS C:\> Format-BicepFile -Path $BicepTemplate

Formats a Bicep file.

Example 2

PS C:\> Format-BicepFile -Path $Directory -OutputDirectory $OtherDir

Formats all Bicep files in a folder and outputs the result as other files in another folder.

PARAMETERS

-AsString

Outputs the Bicep file(s) as string instead of files.

Type: SwitchParameter
Parameter Sets: AsString
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IndentKindOption

The kind of indentation, spaces or tabs.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IndentSize

The size of indentation.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-InsertFinalNewline

Whether or not to insert a final new line in the formatted file(s).

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewlineOption

The newline type for the file.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputDirectory

The directory to output files to.

Type: String
Parameter Sets: OutputDirectory
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputPath

The path to output the file to.

Type: String
Parameter Sets: OutputPath
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

The path to the file or directory of files to format.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

OUTPUTS

System.Object

NOTES

RELATED LINKS