| LastModifiedDate | Author | CreationDate |
|---|
| 25.07.2017 | Stephane van Gulick | 25.07.2017
| date | Comment | Name |
|---|
| function Remove-FromPSModulePath{ | |
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$true)][String]$Path="C:\admin\modules" | |
| ) | |
| if ($env:PSModulePath.split(";") -contains $Path){ | |
| $NewValue = (($env:PSModulePath).Split(";") | ? { $_ -ne $Path }) -join ";" | |
| [Environment]::SetEnvironmentVariable("PSModulePath", $NewValue, "Machine") | |
| $env:PSModulePath = [System.Environment]::GetEnvironmentVariable("PSModulePath","Machine") | |
| write-verbose "$Path removed. Restart the prompt for the changes to take effect." |
| function Get-ClassConstructors { | |
| Param( | |
| $ClassName | |
| ) | |
| $v = [$ClassName].GetConstructors() | % {$_.GetParameters()} | select member,Name,defaultvalue | |
| return $v | |
| } |
| PS C:\Users\taavast3\OneDrive\Scripting\Packer> .\packer.exe build .\hyperv.json | |
| 2017/06/21 23:32:11 Using internal plugin for amazon-ebssurrogate | |
| 2017/06/21 23:32:11 Using internal plugin for amazon-instance | |
| 2017/06/21 23:32:11 Using internal plugin for hyperv-iso | |
| 2017/06/21 23:32:11 Using internal plugin for oneandone | |
| 2017/06/21 23:32:11 Using internal plugin for parallels-pvm | |
| 2017/06/21 23:32:11 Using internal plugin for qemu | |
| 2017/06/21 23:32:11 Using internal plugin for virtualbox-iso | |
| 2017/06/21 23:32:11 Using internal plugin for alicloud-ecs | |
| 2017/06/21 23:32:11 Using internal plugin for amazon-chroot |
| { | |
| "variables": { | |
| "PACKER_LOG": "1", | |
| "PACKER_LOG_PATH": "packerlog.txt" | |
| }, | |
| "Builders": [{ | |
| "type": "hyperv-iso", | |
| "iso_url": "C:\\Users\\taavast3\\Downloads\\en_windows_server_2012_r2_with_update_x64_dvd_6052708 (1).iso", | |
| "iso_checksum": "8E98E65389E8353186356C96B3A26DD1", | |
| "iso_checksum_type": "md5", |
| 2017/06/27 08:14:32 [INFO] Packer version: 1.0.2 | |
| 2017/06/27 08:14:32 Packer Target OS/Arch: windows amd64 | |
| 2017/06/27 08:14:32 Built with Go Version: go1.8.3 | |
| 2017/06/27 08:14:32 Using internal plugin for parallels-pvm | |
| 2017/06/27 08:14:32 Using internal plugin for digitalocean | |
| 2017/06/27 08:14:32 Using internal plugin for oneandone | |
| 2017/06/27 08:14:32 Using internal plugin for cloudstack | |
| 2017/06/27 08:14:32 Using internal plugin for googlecompute | |
| 2017/06/27 08:14:32 Using internal plugin for null | |
| 2017/06/27 08:14:32 Using internal plugin for triton |
| function prompt | |
| { | |
| # The at sign creates an array in case only one history item exists. | |
| $history = @(get-history) | |
| if($history.Count -gt 0) | |
| { | |
| $lastItem = $history[$history.Count - 1] | |
| $lastId = $lastItem.Id | |
| } |
| { | |
| "terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe", | |
| "workbench.colorTheme": "PowerShell ISE", | |
| "workbench.iconTheme": "vscode-great-icons", | |
| "editor.fontSize": 16, | |
| "files.defaultLanguage": "powershell", | |
| "editor.autoClosingBrackets": true, | |
| "editor.autoIndent": true, | |
| "powershell.codeFormatting.preset" : "OTBS" | |
| } |
| function Write-ChangeLog { | |
| [Cmdletbinding()] | |
| param ( | |
| [Parameter(Mandatory=$true)][String]$Message | |
| ) | |
| $ChangeLogWriter = "C:\Admin\Tools\ChangeLogWriter\ChangeLogWriter.exe" | |
| if (Test-Path $ChangeLogWriter) { | |
| Write-Log -Message "Write to the ChangeLogWriter" -Status INFO |
| Function Get-ClusterDataStore { | |
| <# | |
| .SYNOPSIS | |
| Retrieves the datastores that are attached to a cluster | |
| .DESCRIPTION | |
| Returns | |
| .EXAMPLE |