Import-HubContext

    2025-02-17

    Import-HubContext

    SYNOPSIS

    Import a PSHubContext from a .json file at the path received.

    SYNTAX

    Secure Password

    Import-HubContext -Path <string> -SecurePassword [<CommonParameters>]
    

    Password

    Import-HubContext -Path <string> [-Password <string>] [<CommonParameters>]
    

    ALIASES

    This cmdlet has the following aliases,

    DESCRIPTION

    Import a PSHubContext from a .json file at the path received. If SecurePassword is provided, prompt to enter a password to decrypt the .json file. If Password provided, decrypt the .json file with the password received.

    EXAMPLES

    EXAMPLE 1

    PS C:> Import-HubContext -Path "C:\PATH\TO\YOUR\FILE\file.json"

    Import a standard PSHubContext.

    EXAMPLE 2

    PS C:> Import-HubContext -Path "C:\PATH\TO\YOUR\FILE ile.json" -Password "password"

    Import the PSHubContext from a file protected by a password.

    EXAMPLE 3

    PS C:> Import-HubContext -Path "C:\PATH\TO\YOUR\FILE ile.json" -SecurePassword

    Import the PSHubContext from a file protected by a password. The user will be prompted for the password.

    PARAMETERS

    -Password

    Will decrypt the file with the clear password

    Type: System.String
    DefaultValue: ''
    SupportsWildcards: false
    ParameterValue: []
    Aliases: []
    ParameterSets:
    - Name: Password
      Position: Named
      IsRequired: false
      ValueFromPipeline: false
      ValueFromPipelineByPropertyName: false
      ValueFromRemainingArguments: false
    DontShow: false
    AcceptedValues: []
    HelpMessage: ''
    

    -Path

    The file path of Hub context to import.

    Type: System.String
    DefaultValue: ''
    SupportsWildcards: false
    ParameterValue: []
    Aliases: []
    ParameterSets:
    - Name: (All)
      Position: Named
      IsRequired: true
      ValueFromPipeline: false
      ValueFromPipelineByPropertyName: false
      ValueFromRemainingArguments: false
    DontShow: false
    AcceptedValues: []
    HelpMessage: ''
    

    -SecurePassword

    Will prompt the password to decrypt the file with

    Type: System.Management.Automation.SwitchParameter
    DefaultValue: ''
    SupportsWildcards: false
    ParameterValue: []
    Aliases: []
    ParameterSets:
    - Name: Secure Password
      Position: Named
      IsRequired: true
      ValueFromPipeline: false
      ValueFromPipelineByPropertyName: false
      ValueFromRemainingArguments: false
    DontShow: false
    AcceptedValues: []
    HelpMessage: ''
    

    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

    OUTPUTS

    NOTES

    For more information, type "Get-Help Import-HubContext -detailed". For technical information, type "Get-Help Import-HubContext -full".