New-CustomRole

SYNOPSIS

Creates a new Custom Role in AutomatedLab

SYNTAX

New-CustomRole [-Name] <String> [[-InitScript] <String>] [[-InitUrl] <String>] [[-AdditionalFiles] <String[]>]
 [-ProgressAction <ActionPreference>] [<CommonParameters>]

EXAMPLES

EXAMPLE 1

New-CustomRole -Name SampleRole

Create a new role called SampleRole. It will be bootstrapped for you.

EXAMPLE 2

New-CustomRole -Name SampleRole -InitScript C:\scripts\role_scripts\SampleRole.ps1

Create a new role called SampleRole, and use an existing InitScript

EXAMPLE 3

New-CustomRole -Name SampleRole -AdditionalFiles C:\temp\cert.pfx,C:\temp\my.lic

Create a new role called SampleRole and provide some additonal files it requires

EXAMPLE 4

New-CustomRole -Name SampleRole -InitUrl https://fabrikam.com/roles/SampleRole/role.ps1

Creates a new role called SampleRole and downloads the role script from a url and saves it as SampleRole.ps1

PARAMETERS

-Name

The name of the custom role

Type: String
Parameter Sets: (All)
Aliases:

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

-InitScript

If you already have the role script written, provide it with -InitScript

Type: String
Parameter Sets: (All)
Aliases:

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

-InitUrl

This is a url to a PowerShell hosted online, e.g a gist or repository.

Type: String
Parameter Sets: (All)
Aliases:

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

-AdditionalFiles

Provide the file path of any additional files the role requires to function

Type: String[]
Parameter Sets: (All)
Aliases:

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

-ProgressAction

{{ Fill ProgressAction Description }}

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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