< Back

Export-VMHostProfile

Sun Jan 19, 2020 6:48 pm

NAME Export-VMHostProfile



SYNOPSIS

This cmdlet exports the specified host profile to a file.





SYNTAX

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

[<CommonParameters>]





DESCRIPTION

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.





PARAMETERS

-FilePath <String>

Specifies the path to the file where you want to export the host profile.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Indicates that the cmdlet overwrites the existing destination files and creates directories to complete the

specified file path.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Profile <VMHostProfile>

Specifies the host profile you want to export.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByValue)

Accept wildcard characters? true



-Server <VIServer>

Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? true



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Zero or more FileInfo objects







NOTES









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

Online Version: https://code.vmware.com/doc/preview?id= ... ofile.html

Invoke-VMHostProfile

Get-VMHostProfile

Import-VMHostProfile

Remove-VMHostProfile

Set-VMHostProfile

Test-VMHostProfileCompliance

New-VMHostProfile