Export-HcsSupportPackage

Export-HcsSupportPackage

Bundles logs into a single .zip file.

Syntax

Parameter Set: Default
Export-HcsSupportPackage [-Path] <String> -EncryptionPassphrase <SecureString> [-Credential <PSCredential> ] [-Force] [-Include <ElementFlag> {None | RegistryKeys | EtwLogs | PeriodicEtwLogs | LogFiles | DumpLog | StackDumps | FullDumps | MiniDumps | ClusterManagementLog | XutilDdump | XutilLogdump | BmcLogs | Rttdump | ClusterLog | UpdateLogs | CbsLogs | StorageCmdlets | ClusterCmdlets | ConfigurationCmdlets | KernelDump | Performance | MdsAgentLogs | NetworkCmdlets | NetworkCmds | MgmtSvcLogs | PeriodicMgmtSvcLogs | Default | NonDefault | All} ] [-IncludeArchived] [-MaximumTimestamp <Nullable [System.DateTime]> ] [-MinimumTimestamp <DateTime]> ] [-NoSplit] [-PackageTag <String> ] [-Scope <ClusterScope> {Cluster | Controller} ] [-SplitSizeBytes <Nullable [System.Int64]> ] [ <CommonParameters>]

Detailed Description

The Export-HcsSupportPackage cmdlet bundles the logs of each controller device into a .zip file. This cmdlet creates one .zip file per controller. Microsoft Customer Service and Support uses these logs to help troubleshoot the device.

This cmldet uses an encryption passphrase to encrypt the package. Share this passphrase with Customer Service and Support.

Parameters

-Credential<PSCredential>

Specifies a PSCredential object. Specify a credential that has write permission for the location that the Path parameter specifies. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EncryptionPassphrase<SecureString>

Specifies a passphrase, as a secure string. The cmdlet encrypts the support package by using the passphrase. For Customer Service and Support staff to read the file, you must provide them with the passphrase.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Indicates that the cmdlet does not prompt you for confirmation of the encryption passphrase.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Include<ElementFlag>

Specifies an element flag. This parameter determines which logs to include in the support package.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-IncludeArchived

Indicates that the cmdlet includes archived logs.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MaximumTimestamp<Nullable [System.DateTime]>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MinimumTimestamp<DateTime]>

Specifies the earliest time to include as a DateTime object. To obtain a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoSplit

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PackageTag<String>

Specifies the folder of the support package. The cmdlet adds the folder in the folder that the Path parameter specifies. If you do not specify this parameter, the cmdlet uses the default value of [appliance name]-[current date and time:yyyy-MM-dd-HH-mm-ss].

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the network location where the cmdlet stores the support package.

If you have trouble accessing a network share by specifying a name (for example, \\mysharehost\temp\), try accessing it by IP address instead (for example, \\192.168.0.25\temp\). Because this device is not joined to a domain, accessing network shares by name does not always work, depending on the configuration of your network. The device cannot communicate over IPSEC enabled networks.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Scope<ClusterScope>

Specifies the scope. The acceptable values for this parameter are:

-- Cluster. Generate a support package for both nodes. This is the default.
-- Controller. Generate a support package for the local node only.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SplitSizeBytes<Nullable [System.Int64]>

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Store bundled logs in a location

This command gathers logs into a support package, and then stores that package in the specified path. The cmdlet gathers only the logs defined by the Include parameter. The command specifies a value of Controller for the Scope parameter, so the command gets logs from the local node only.

PS C:\> Export-HcsSupportPackage -Path "\\10.111.172.250\public" -Include Rttdump -Scope Controller 

Example 2: Store bundled logs in a location that requires credentials

This command gathers logs into a support package, and then stores that package in the specified path. The path requires you to supply credentials in order to save the file there. Like the previous example, this command specifies the Include and Scope parameters.

When you run this command, a dialog prompts you for your password. After you enter your password, the console displays output.

PS C:\> Export-HcsSupportPackage -Path "\\10.111.172.250\restricted\davidchew" -Credential "contoso\dchew" -Include Rttdump -Scope Controller

Enable-HcsSupportAccess

Get-Credential

ConvertTo-SecureString

Get-Date