This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-VMNetworkAdapter -VMName dhcpserver -Name ExternalNetwork | |
$sw = Get-VMSwitch | Where {$_.SwitchType -eq "External"} | |
Connect-VMNetworkAdapter -VMName dhcpserver -Name "ExternalNetwork" -VMSwitch $sw |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-VMNetworkAdapter -VMName dhcpserver -Name TestNetwork -StaticMacAddress 00602F123456 -SwitchName ate-internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-VMNetworkAdapter -VMName dhcpserver | |
Remove-VMNetworkAdapter -VMName dhcpserver -Name "Network Adapter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
New-VMSwitch -Name ate-internal -SwitchType Internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TemplateDirectory = $env:TEMPLATE_DIRECTORY | |
$ImageDirectory = $env:IMAGE_DIRECTORY | |
$Image = $env:IMAGE | |
$Template = $env:TEMPLATE | |
$vmcx = ls "$TemplateDirectory\$Template\Virtual Machines\*.vmcx" | |
$path = "$TemplateDirectory\$Template\Virtual Machines\" + $vmcx.Name | |
$vmpath = "$ImageDirectory\$Image" | |
Import-VM -Path $path -Copy -GenerateNewId -VirtualMachinePath $vmpath -VhdDestinationPath "$vmpath\Virtual Hard Disks" | |
$vm = Get-VM | Where {$_.Path.StartsWith($vmpath)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestCommand : ICommand | |
{ | |
private bool _whatShouldWeReturnForCanExecute; | |
public bool WhatShouldWeReturnForCanExecute | |
{ | |
get => _whatShouldWeReturnForCanExecute; | |
set | |
{ | |
if (_whatShouldWeReturnForCanExecute == value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="Z12_Commands.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:Z12_Commands" | |
mc:Ignorable="d" | |
Title="MainWindow" Height="350" Width="525"> | |
<DockPanel LastChildFill="True"> | |
<Menu IsMainMenu="True" DockPanel.Dock="Top"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$vm = Get-VM | Where-Object {$_.Path.StartsWith('D:\working-images\img001')} | |
Rename-VM -VM $vm -NewName img001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-VM -Path 'D:\ate\images\ate-windows-base\Virtual Machines\2005C276-155C-4AD1-8DB6-963EDFB6DB84.vmcx' -Copy -GenerateNewId -VirtualMachinePath D:\working-images\img001 -VhdDestinationPath 'D:\working-images\img001\Virtual Hard Disks' |