Install-WindowsFeature command in PowerShell on AWS
The Install-WindowsFeature command is used to install specific features on a computer running the Windows Server operating system in an AWS environment, or on an offline virtual disk (VHD) that has Windows Server installed. This command works similarly to installing roles and features through Server Manager, with one important exception: it does not automatically install management tools for the features. To install management tools such as snap-ins on a target server, you need to add the IncludeManagementTools parameter to your command.
Note that this command requires elevation permission; You need to be running a Windows PowerShell session as an administrator to use this command.
Example of installing features with management tools on AWS:
Install-WindowsFeature RSAT-AD-Tools, RSAT-DNS-Server, Multipath-IO, Failover-Clustering -IncludeManagementTools -Restart
Explain:
If you are not using the latest Windows AMIs provided by Amazon, you can perform the following procedure to install the current AWS NVMe driver. You should perform this update at a convenient time to restart your virtual machine. Either, the installation script will automatically restart your virtual machine, or you will have to manually restart the virtual machine as a final step.
We recommend that you create an AMI as a backup as follows, in case you need to roll back to an older version.
When you stop a virtual machine, the data on the virtual machine’s storage volumes is deleted. Before stopping your virtual machine, make sure you have copied any data you need from your virtual machine’s storage volumes to persistent storage, such as Amazon EBS or Amazon S3.
Use browser:
Using PowerShell:
Invoke-WebRequest https://s3.amazonaws.com/ec2-windows-drivers-downloads/NVMe/Latest/AWSNVMe.zip -outfile $env:USERPROFILE\nvme_driver.zip
Expand-Archive $env:userprofile\nvme_driver.zip -DestinationPath $env:userprofile\nvme_driver
You can enable this feature when running the install.ps1 script to install the driver by specifying the EnableSCSIPersistentReservations parameter with a value of $true.
cd C:\Users\Admin\nvme_driver
C:\Users\Admin\nvme_driver\ .\install.ps1 -EnableSCSIPersistentReservations $true
You can disable this feature when running the install.ps1 script to install the driver by specifying the EnableSCSIPersistentReservations parameter with a value of $false.
PS C:\> .\install.ps1 -EnableSCSIPersistentReservations $false
Starting with version 1.5.0 of AWS NVMe, the install.ps1
script always installs the ebsnvme-id
engine along with the driver.
(Optional) For versions 1.4.0, 1.4.1 and 1.4.2, the install.ps1
script allows you to specify whether the ebsnvme-id
tool should be installed with with driver or not.
To install the ebsnvme-id
tool, specify InstallEBSNVMeIdTool 'Yes'
.
If you do not want to install the tool, specify InstallEBSNVMeIdTool 'No'
.
If you do not specify InstallEBSNVMeIdTool
and the tool is already available at C:\ProgramData\Amazon\Tools
, the package will upgrade the default tool. If the tool is not available, install.ps1
will not upgrade the default tool.
If you do not want to install the tool as part of the package and want to install it later, you can find the latest version of the tool in the driver package. Or you can download version 1.0.0 from Amazon S3:
Download the ebsnvme-id
tool: [https://s3.amazonaws.com/ec2-windows-drivers-downloads/EBSNVMeID/Latest/ebsnvme-id.zip](https://s3.amazonaws.com/ ec2-windows-drivers-downloads/EBSNVMeID/Latest/ebsnvme-id.zip)
If the installer does not restart your virtual machine, restart the virtual machine.
Go to Network Adapter Settings.
Select Ethernet (Ethernet Network).
Go to Properties (Settings).
Select IPv4 Properties (IPv4 Settings).
Go to Advanced Tab.
Go to DNS section.
Select the option Append primary and connection specific DNS suffixes (Add primary DNS suffix and connection specific DNS suffix).
Note: You need to ensure that you have registered an Active Directory (AD) DNS server for your network server before performing this configuration.