Skip to content

Start PSResourceGetBootstrap

viscalyxbot edited this page Feb 1, 2024 · 1 revision

Start-PSResourceGetBootstrap

SYNOPSIS

Bootstraps the Microsoft.PowerShell.PSResourceGet module to the specified location.

SYNTAX

Scope (Default)

Start-PSResourceGetBootstrap [-Scope <String>] [-Version <String>] [-UseCompatibilityModule]
 [-CompatibilityModuleVersion <String>] [-ImportModule] [-Force] [-WhatIf]
 [-Confirm] [<CommonParameters>]

Destination

Start-PSResourceGetBootstrap -Destination <String> [-Version <String>] [-UseCompatibilityModule]
 [-CompatibilityModuleVersion <String>] [-ImportModule] [-Force] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

The command Start-PSResourceGetBootstrap is used to bootstrap the Microsoft.PowerShell.PSResourceGet module.

It supports two parameter sets: 'Destination' and 'Scope'. The 'Destination' parameter set allows you to specify a specific location to save the module, while the 'Scope' parameter set saves the module to the appropriate $env:PSModulePath location based on the specified scope ('CurrentUser' or 'AllUsers').

EXAMPLES

EXAMPLE 1

Start-PSResourceGetBootstrap -Destination 'C:\Modules'

This example bootstraps the Microsoft.PowerShell.PSResourceGet module, saving it to the specified destination path "C:\Modules".

EXAMPLE 2

Start-PSResourceGetBootstrap -Scope 'AllUsers'

This example bootstraps the Microsoft.PowerShell.PSResourceGet module, saving it to the appropriate location based on the 'AllUsers' scope.

EXAMPLE 3

Start-PSResourceGetBootstrap -UseCompatibilityModule

This example bootstraps the Microsoft.PowerShell.PSResourceGet module, saving it to the appropriate location based on the default scope ('CurrentUser'). It will also save the compatibility module to the same location.

PARAMETERS

-CompatibilityModuleVersion

Specifies the version of the compatibility module to download. If not specified, it will default to a minimum required range that includes previews.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: [3.0.22,]
Accept pipeline input: False
Accept wildcard characters: False

-Destination

Specifies the destination path where the module should be saved. This parameter is mandatory when using the 'Destination' parameter set. The path must be a valid container.

Type: String
Parameter Sets: Destination
Aliases:

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

-Force

Forces the operation without prompting for confirmation. This is useful when running the script in non-interactive mode.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-ImportModule

Indicates whether to import the module after it has been downloaded.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Scope

Specifies the scope for saving the module. This parameter is used when using the 'Scope' parameter set. The valid values are 'CurrentUser' and 'AllUsers'. The default value is 'CurrentUser'.

Type: String
Parameter Sets: Scope
Aliases:

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

-UseCompatibilityModule

Indicates whether to use the compatibility module. If this switch parameter is present, the compatibility module will be downloaded.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

-Version

Specifies the version of the Microsoft.PowerShell.PSResourceGet module to download. If not specified, the latest version will be downloaded.

Type: String
Parameter Sets: (All)
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

-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

None.

NOTES

RELATED LINKS