Skip to content

Latest commit

 

History

History
178 lines (137 loc) · 4.21 KB

Invoke-Plaster.md

File metadata and controls

178 lines (137 loc) · 4.21 KB
external help file Module Name online version schema
Plaster-help.xml
Plaster
2.0.0

Invoke-Plaster

SYNOPSIS

Invokes the specified Plaster template which will scaffold out a file or a set of files and directories.

SYNTAX

Invoke-Plaster [-TemplatePath] <String> [-DestinationPath] <String> [-Force] [-NoLogo] [-PassThru] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Invokes the specified Plaster template which will scaffold out a file or a set of files and directories.

EXAMPLES

EXAMPLE 1

Invoke-Plaster -TemplatePath . -Destination ~\GitHub\NewModule

This will invoke the Plaster template in the current directory. The template will generate any files and directories in the ~\GitHub\NewModule directory.

EXAMPLE 2

Invoke-Plaster -TemplatePath . -Destination ~\GitHub\NewModule -ModuleName Foo -Version 1.0.0

This will invoke the Plaster template in the current directory using dynamic parameters ModuleName and Version extracted from the parameters section of the manifest file. The template will generate any files and directories in the ~\GitHub\NewModule directory.

Note: The parameters -ModuleName and -Version are dynamically added from the plaster manifest file in the current directory. If you run this command it may fail if the manifest file you are testing with does not contain these parameters.

PARAMETERS

-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

-DestinationPath

Specifies the path to directory in which the template will use as a root directory when generating files. If the directory does not exist, it will be created.

Type: String
Parameter Sets: (All)
Aliases:

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

-Force

Specify Force to override user prompts for conflicting handling. This will override the confirmation prompt and allow the template to overwrite existing files.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-NoLogo

Suppresses the display of the Plaster logo.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-PassThru

Returns an InvokePlasterInfo object with the following fields:

  • TemplatePath
  • DestinationPath
  • Success
  • CreatedFiles
  • UpdatedFiles
  • MissingModules
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-TemplatePath

Specifies the path to the template directory.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
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, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS

New-PlasterManifest Test-PlasterManifest