Share via


Export-HcsSupportPackage

Export-HcsSupportPackage

Bundles logs into a single .zip file.

語法

Parameter Set: Default
Export-HcsSupportPackage [-Path] <String> -EncryptionPassphrase <SecureString> [-Credential <PSCredential> ] [-Force] [-Include <ElementFlag> ] [-IncludeArchived] [-MinimumTimestamp <DateTime> ] [-PackageTag <String> ] [-Scope <ClusterScope> ] [ <CommonParameters>]

詳細描述

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.

參數

-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.

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

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.

別名

必要?

true

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-Force

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

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-Include<ElementFlag>

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

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

-IncludeArchived

Indicates that the cmdlet includes archived logs.

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

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.

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

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].

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

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.

別名

必要?

true

位置?

1

預設值

接受管線輸入?

false

接受萬用字元?

false

-Scope<ClusterScope>

Specifies the scope. 此參數接受的值包括:

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

別名

必要?

false

位置?

named

預設值

接受管線輸入?

false

接受萬用字元?

false

<CommonParameters>

此 Cmdlet 支援一般參數:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 與 -OutVariable。如需詳細資訊,請參閱 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

輸入

輸入類型是您可以使用管線處理方式傳遞給 Cmdlet 的物件類型。

輸出

輸出類型是 Cmdlet 所發出的物件類型。

範例

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