vSphere PowerCLI Reference

Export-VMHostProfile

Synopsis

Exports the specified host profile to a file.

Syntax

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

Related Commands

Online version
Apply-VMHostProfile
Get-VMHostProfile
Import-VMHostProfile
Remove-VMHostProfile
Set-VMHostProfile
Test-VMHostProfileCompliance
New-VMHostProfile

Detailed Description

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 to complete the specified file path are created.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
FilePathStringSpecify the path to the file where you want to export the host profile.truefalse
ProfileVMHostProfileSpecify the host profile you want to export.truetrue (ByValue)
ForceSwitchParameterIndicate whether the cmdlet overwrites the existing destination files and creates directories to complete the specified file path.falsefalse
ServerVIServerSpecify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.falsefalse

Return Type

System.IO.FileInfo

Notes

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.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.