Save the current PSHubContext to a .json file at the path received
Save-HubContext -Path <string> -SecurePassword [-PSHubContext <PSHubContext>] [-Force]
[<CommonParameters>]
Save-HubContext -Path <string> [-PSHubContext <PSHubContext>] [-Password <string>] [-Force]
[<CommonParameters>]
Save the current PSHubContext to a .json file at the path received. If PSHubContext is provided, save this one to a .sjon file. If Force is provided, overwrite file if the path already exist. If SecurePassword is provided, prompt to user to enter a password to encrypt the .json file. If Password provided, encrypt the .json file with the password received.
PS C:\> Save-HubContext -Path "C:\PATH\TO\YOUR\FILE\file.json"
Save the current PSHubContext.
PS C:\> Save-HubContext -Path "C:\PATH\TO\YOUR\FILE\file.json" -Password "password"
Save the current PSHubContext in a file protected by a password.
PS C:\> $availCtxs = Get-HubContext; Save-HubContext -Path "C:\PATH\TO\YOUR\FILE\file.json" -PSHubContext $availCtxs[2] -SecurePassword
Fetch all available contexts. Save the third PSHubContext in a file protected by a password who will be filled be a prompt.
Overwrite the file if exist
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
Will encrypt the file with the clear password
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Password
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
Specifies the path of the file to save Hub context.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
Save Hub context to file.
Type: Devolutions.Hub.PowerShell.Entities.PowerShell.PSHubContext
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
Will prompt the password to encrypt the file with
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: Secure Password
Position: Named
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
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.
For more information, type "Get-Help Save-HubContext -detailed". For technical information, type "Get-Help Save-HubContext -full".