Category Archives: Uncategorized

Change Network Types Using PowerShell in Windows 10

On Windows 10/Windows Server 2016/2019, you can manage network connection location from the PowerShell. Run the elevated PowerShell console.

Now use the Get-NetConnectionProfile cmdlet to get a list of network adapters on your computer and their associated network profiles.

In my example, there is only one physical network adapter on a computer with a Public network location type (in the NetworkCategory value, you can see the following types of network profiles: Public, Private or DomainAuthenticated).

Get-NetConnectionProfile

Let’s try to change the assigned network profile for the NIC. We need to get the index assigned to this network card. In this example, InterfaceIndex is 8.

Name : Network 2
InterfaceAlias : Ethernet0
InterfaceIndex : 8
NetworkCategory : Public
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic

After you get the network adapter index, you can change the network type to Private:

Set-NetConnectionProfile -InterfaceIndex 8 -NetworkCategory Private

Check that the network profile has changed:

Get-NetConnectionProfile -InterfaceIndex 19

Set-NetConnectionProfile NetworkCategory - powershell

The new firewall rules will be applied to the interface according to the assigned network profile without rebooting.

You can also change the network profile for all network adapters of the computer at once:

Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private

Original article taken from http://woshub.com/how-to-change-a-network-type-from-public-to-private-in-windows/

How to resolve “Instance does not have a volume attached at root (/dev/sda1)” AWS error.

Error details: Instance does not have a volume attached at root (/dev/sda1)

This error comes when Device name given while attaching the root volume differs from Root device attached to EC2 instance during launch.

How to Resolve This Error

In order to resolve this error follow below steps:

Step1: Note down the device name in error while starting the EC2 instance.

Instance does not have a volume attached at root (/dev/sda1)

In the above screen shot error is related to device name /dev/sda1. We need to use same device name while attaching the volume to EC2 instance.

Step2:Detach the currently connected Volume with EC2

  1. Go to ELASTIC BLOCK STORE –> Volumes and select respective attached volume . This volume will be having status as “in-use”.
  2. Then click on Detach volume option from Action drop down menu.

Step3:Attach volume to EC2

Try to attached same volume to EC2 instance. However make sure that you are not using default “Device” such as “/dev/sdf” as below while attaching volume to EC2 instance.

Do not Use below by-default Device name.

Instance does not have a volume attached at root (/dev/sda1)

Instead Use Device name as /dev/sda1  which we have noted down in the step1 as below and click AttachButton:

Instance does not have a volume attached at root (/dev/sda1)

Step4:Start  EC2 instance

This time when you try to start the instance, the error “Instance does not have a volume attached at root (/dev/sda1)” will not occur and your EC2 instance will be start successfully.

Original article sourced from:
https://linuxroutes.com/how-to-resolve-instance-does-not-have-a-volume-attached-at-root-dev-sda1-error/