Export last host profile – PS Powercli script

Share This:

Quick script to export last host profile: https://github.com/cann0nf0dder/PS_PowerCLI.git

<#
NAME: Export_HostProfile.ps1
AUTHOR: Chris Danielewski
DATE : 8/22/2017
PURPOSE: This script will export host profile to new pod config location.

OUTPUT: N/A
REQUIRED UTILITIES: PowerCLI,

==========================================================================
CHANGE HISTORY:
GE HISTORY:
v1.0 8/22/2017 CD New script!
#>

param(
[Parameter(Mandatory=$true)][String]$location
)

#environemt
$lastprof = @()
$lastprof = Get-VMHostProfile
$hostProfile = $lastprof[-1]
$hostProfileName = $lastprof[-1].Name
$output = $location + “\” + “profile.vpf”
Export-VMHostProfile -FilePath $output -Profile $hostProfile -Force

Leave a comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.