Disconnect-Cloud¶
SYNOPSIS¶
Clears PSCumulus session context for a specific cloud provider.
SYNTAX¶
__AllParameterSets¶
Disconnect-Cloud [-Provider] <string> [[-TenantId] <string>] [[-Subscription] <string>]
[[-AccountId] <string>] [[-ProfileName] <string>] [[-Region] <string>] [[-Project] <string>]
[[-AccountEmail] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
ALIASES¶
This cmdlet has the following aliases, None
DESCRIPTION¶
Disconnect-Cloud removes the stored PSCumulus session context for one provider from the current PowerShell session. The command is scoped to the selected provider and can optionally verify account or scope details before clearing the stored context.
This does not sign you out of the provider itself. It only clears PSCumulus's remembered session state.
EXAMPLES¶
EXAMPLE 1¶
Disconnect-Cloud -Provider Azure
Clears the stored Azure context for the current shell.
EXAMPLE 2¶
Disconnect-Cloud -Provider AWS -AccountId '123456789012'
Clears the stored AWS context only if it matches the supplied account id.
EXAMPLE 3¶
Disconnect-Cloud -Provider GCP -Project 'my-project'
Clears the stored GCP context only if it matches the supplied project.
EXAMPLE 4¶
Disconnect-Cloud -Provider GCP -AccountEmail 'adil@example.com'
Clears the stored GCP context only if it matches the supplied account email.
PARAMETERS¶
-AccountEmail¶
Only disconnect GCP if the stored account email matches this value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 7
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-AccountId¶
Only disconnect AWS if the stored account id matches this value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 3
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Confirm¶
Prompts you for confirmation before running the cmdlet.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-ProfileName¶
Only disconnect AWS if the stored profile name matches this value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 4
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Project¶
Only disconnect GCP if the stored project matches this value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 6
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Provider¶
The provider context to clear.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Region¶
Only disconnect AWS if the stored region matches this value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 5
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Subscription¶
Only disconnect Azure if the stored subscription name or id matches this value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 2
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-TenantId¶
Only disconnect Azure if the stored tenant id matches this value.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 1
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-WhatIf¶
Runs the command in a mode that only reports what would happen without performing the actions.
Type: System.Management.Automation.SwitchParameter
DefaultValue: ''
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
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¶
System.Management.Automation.PSObject¶
See the command description and examples above.
NOTES¶
RELATED LINKS¶
None.