Over the weekend I was bored and decided to start a project to automate the process of standing up an IE VM with powershell. I would like to introduce PSIEVM. A powershell module that allows you to stand up an IE VM in VirtualBox (other hosts coming in the future) in one line.
PS> Get-IEVM –OS Win7 –IEVersion 9
That is the simplest form of the command.
Installation
To install, download from the github project releases page and extract to $env:USERPROFILE\WindowsPowerShell\Modules. Then to use it just import it
PS> Import-Module psievm
PS> Get-IEVM –OS Win7 –IEVersion 10 –AlternateVMLocation "G:\VMs\" –VMRootPath "G:\VMs\"
The parameters for Get-IEVM:
Name | Required | Type | Default |
---|---|---|---|
OS | YES | String | [Empty] |
The OS to use:
| |||
IEVersion | YES | String | [Empty] |
The version of IE. This is dependant on the version of Windows (See the table below).
| |||
Shares | NO | String[] | [Empty] |
These are the paths to add as a share in the VM through the VMHost. May not be fully supported in all VMHosts. | |||
AlternateVMLocation | NO | String | [Empty] |
By default the VM images will be downloaded from Microsoft, but if you have the images downloaded already, you can use this to tell the script where to get them. This can be a URL, Network Share, or a local path. The images need to follow the following pattern: IE: IE<IEVersion>.Win<OSVersion>.For.Windows.<VMHost>.zip | |||
VMHost | NO | String | VirtualBox |
The VM Host to use. Only VirtualBox is currently supported but here is the full list that will be supported (and maybe others).
| |||
IgnoreInvalidMD5 | NO | Boolean | $False |
After the zip image is downloaded, the file MD5 hash is validated. If you use your own images, you will want to set this to $True. | |||
VMRootPath | NO | String | $PWD |
This is the path to download the zip image to and create the VM image folder where the VM will reside. By default it will use the Current Working Directory. |
OS / IEVersion
This is the version of the OS that you want hosted and the version of IE you want with it. Here are the supported values:
IE 6 | IE 7 | IE 8 | IE 9 | IE 10 | IE 11 | MS Edge | Requires 64-bit Emulation | |
---|---|---|---|---|---|---|---|---|
XP | X |
| X |
|
|
|
|
|
Vista |
| X |
|
|
|
|
|
|
Win7 |
|
| X | X | X | X |
|
|
Win8 |
|
|
|
| X |
|
|
|
Win8.1 |
|
|
|
|
| X |
| X |
Win10 |
|
|
|
|
|
| X | X |
No comments:
Post a Comment