Skip to content

Instantly share code, notes, and snippets.

@vhusker
Created August 26, 2015 11:19
Show Gist options
  • Save vhusker/c25021f1196b6fd5c49e to your computer and use it in GitHub Desktop.
Save vhusker/c25021f1196b6fd5c49e to your computer and use it in GitHub Desktop.
Resource Key w/ Computer Name
Configuration BuildHyperVHost{
Param(
[string]$ComputerName="blah",
[string]$HostIPAddress,
[string]$DeploymentFilesPath,
[string]$BaseVHDFile,
[string]$DestinationDrive
)
Import-DSCResource -ModuleName @{ModuleName="xComputerManagement";ModuleVersion="1.3.0"}
node localhost{
File CopyDeploymentFiles{
Type = "Directory"
Recurse = $True
SourcePath = $DeploymentFilesPath
DestinationPath = "C:\DeploymentFiles"
Ensure = "Present"
Force = $True
}
xComputer RenameComputer{
Name = $ComputerName
}
}
}
BuildHyperVHost -OutputPath C:\Temp -ComputerName "mycomp"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment