Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. **********************
  2. Windows PowerShell transcript start
  3. Start time: 20160405151609
  4. Username: COMPUTERNAMEDerik
  5. RunAs User: COMPUTERNAMEDerik
  6. Machine: COMPUTERNAME (Microsoft Windows NT 10.0.14295.0)
  7. Host Application: C:WINDOWSsystem32WindowsPowerShellv1.0PowerShell_ISE.exe
  8. Process ID: 15720
  9. PSVersion: 5.1.14295.1000
  10. PSEdition: Desktop
  11. PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14295.1000
  12. CLRVersion: 4.0.30319.42000
  13. BuildVersion: 10.0.14295.1000
  14. WSManStackVersion: 3.0
  15. PSRemotingProtocolVersion: 2.3
  16. SerializationVersion: 1.1.0.1
  17. **********************
  18. INFO : Looking for the requested Windows image in the WIM file
  19. PS>TerminatingError(New-Object): "Cannot find type [WIM2VHD.WimFile]: verify that the assembly containing this type is loaded."
  20. ERROR : Cannot find type [WIM2VHD.WimFile]: verify that the assembly containing this type is loaded.
  21. INFO : Log folder is C:UsersDerikAppDataLocalTempConvert-WindowsImage3fde98b4-a454-4ce2-86f6-cc15a22cb2b1
  22. INFO : Done.
  23. **********************
  24. Windows PowerShell transcript end
  25. End time: 20160405151609
  26. **********************
  27.  
  28. Import-Module 'C:NanoServerImageGenerator.psm1'
  29.  
  30. $serverName = "server-name"
  31. $password = ConvertTo-SecureString "strongPassword" -AsPlainText -Force
  32.  
  33. $VMdir = "E:VMsHyper-V"
  34. $projectDir = Join-Path $VMdir $project
  35. $serverPath = Join-Path $projectDir $servername
  36. $nanoBasePath = Join-Path $serverPath "NanoBase"
  37. $VHDExtension = "vhdx"
  38. $VHDName = "$servername.$VHDExtension"
  39. $VHDPath = Join-Path $serverPath $VHDName
  40.  
  41. $MediaPath = "\uncpathInstallMedia"
  42. $MediaName = "WindowsServer2016_CTP4_X64FRE_EN-US.ISO"
  43. $MediaPath = Join-Path $MediaPath $MediaName
  44.  
  45. $mountResult = Mount-DiskImage $MediaPath -PassThru
  46. $mountedDriveLetter = ($mountResult | Get-Volume).DriveLetter
  47.  
  48. $MediaPath = "$mountedDriveLetter`:"
  49.  
  50. if(-not (Test-Path $projectDir)) { New-Item $projectDir -ItemType Directory }
  51. if(-not (Test-Path $serverPath)) { New-Item $serverPath -ItemType Directory }
  52. if(-not (Test-Path $nanoBasePath)) { New-Item $nanoBasePath -ItemType Directory }
  53.  
  54. #<#
  55. New-NanoServerImage `
  56. -MediaPath $MediaPath `
  57. -BasePath $nanoBasePath `
  58. -TargetPath $VHDPath `
  59. -ComputerName $serverName `
  60. -OEMDrivers `
  61. -AdministratorPassword $password `
  62. -Clustering
  63. #>
  64.  
  65. $mountResult | Dismount-DiskImage
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement