PoshCode Archive  Artifact [03b10c8c7f]

Artifact 03b10c8c7fb20a532842ce91fe23444241d2b1b509657b9b46da630ad615d939:

  • File test.ps1 — part of check-in [4b9cf936e7] at 2018-06-10 14:16:08 on branch trunk — test (user: teste size: 903)

# encoding: ascii
# api: powershell
# title: test
# description: test
# version: 0.1
# type: module
# author: teste
# license: CC0
# x-poshcode-id: 6452
# x-archived: 2016-07-27T03:05:36
# x-published: 2016-07-21T15:29:00
#
#
#region PREREQUISITES

    # Variables
    Get-VM
    $password = ConvertTo-SecureString -AsPlainText -Force -String 'Pa$$w0rd'

    $iso_X = 'C:\depot\iso_x\en_windows_server_2016_technical_preview_4_x64_dvd_7258292\'
    $VirtualHardDiskPath = (Get-VMHost).VirtualHardDiskPath 

    # Nano creation module (from WS 2016 ISO) 
    Import-Module "C:\NanoServer_TP4\NanoServerImageGenerator.psm1 "

#endregion

#region  NANO1 

    # GEN 1 VM (Workgroup)

    $nanoName = 'sea-nano11'
    $nanoHardDisk = "$VirtualHardDiskPath\$nanoName.vhd"

    if (Test-Path $nanoHardDisk) {
      Get-ChildItem $nanoHardDisk | Remove-Item -Confirm
    }