Export-VMHostProfile

This cmdlet exports the specified host profile to a file that is in the VMware profile format (.vpf). If the value of the Force parameter is $false and the destination file exists or the target parent directory does not exist, a terminating error is generated. If the value of the Force parameter is $true, the existing destination file is overwritten and directories are created to complete the specified file path.

Syntax

[-Profile]  <VMHostProfile>
-FilePath  <String>
[-Force]
[-Server  <VIServer>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Profile
VMHostProfile 1
  • wildcards
  • pipeline
  • Specifies the host profile you want to export.
    required
    FilePath
    String named Specifies the path to the file where you want to export the host profile.
    optional
    Force
    SwitchParameter named Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the specified file path.
    optional
    Server
    VIServer named
  • wildcards
  • Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

    Output

    System.IO.FileInfo

    Examples


    Example 1

    $profile = (Get-VMHostProfile -Name Profile )[0]
    Export-VMHostProfile -FilePath export.prf -Profile $profile -Force

    Exports the selected host profile to the export.prf file.

    Related Commands

    Feedback

    Was this page helpful?