Export-CloudInventory¶
SYNOPSIS¶
Exports all connected cloud inventory to a file.
SYNTAX¶
__AllParameterSets¶
Export-CloudInventory [-Path] <string> [-Format <string>] [-Kind <string[]>] [-Provider <string[]>]
[-WhatIf] [-Confirm] [<CommonParameters>]
ALIASES¶
This cmdlet has the following aliases, None
DESCRIPTION¶
Exports a point-in-time snapshot of every resource across every connected cloud to a file in JSON or CSV format. Useful for compliance audits, before/after snapshots, and inventory diffing.
EXAMPLES¶
EXAMPLE 1¶
Export-CloudInventory -Path 'inventory.json'
Exports all resources from all connected providers to inventory.json (JSON format).
EXAMPLE 2¶
Export-CloudInventory -Path 'inventory.csv' -Format Csv
Exports all resources to inventory.csv in CSV format.
EXAMPLE 3¶
Export-CloudInventory -Path 'azure-inventory.json' -Provider Azure -Kind Instance, Disk
Exports only Azure instances and disks to azure-inventory.json.
PARAMETERS¶
-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: ''
-Format¶
The output format.
Type: System.String
DefaultValue: Json
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Kind¶
The resource kinds to include.
Type: System.String[]
DefaultValue: "@('Instance', 'Disk', 'Storage', 'Network', 'Function')"
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Path¶
The output file path.
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: 0
IsRequired: true
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
-Provider¶
Limit to specific providers.
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
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.IO.FileInfo¶
See the command description and examples above.
NOTES¶
RELATED LINKS¶
None.