Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

You're reading from  Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

Product type Book
Published in Sep 2017
Publisher
ISBN-13 9781787122048
Pages 660 pages
Edition 2nd Edition
Languages
Authors (2):
Thomas Lee Thomas Lee
Profile icon Thomas Lee
 Ed Goad Ed Goad
Profile icon Ed Goad
View More author details

Table of Contents (21) Chapters

Title Page
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. What's New in PowerShell and Windows Server 2. Implementing Nano Server 3. Managing Windows Updates 4. Managing Printers 5. Managing Server Backup 6. Managing Performance 7. Troubleshooting Windows Server 2016 8. Managing Windows Networking Services 9. Managing Network Shares 10. Managing Internet Information Server 11. Managing Hyper-V 12. Managing Azure 13. Using Desired State Configuration

Configuring Hyper-V networking


In the Creating a virtual machine recipe, you created a VM, VM1. This virtual machine has, by default, a single network card that Hyper-V sets to acquire IP address details from DHCP. In this recipe, you assign the NIC to a switch and configure IP address details.

Getting ready

This recipe assumes you have created VM1 as per the Creating a virtual machine recipe. The recipe also makes use of a DHCP server running on DC1. You set this DHCP server up in the Installing and authorizing a DHCP Server recipe, and configured the DHCP server in the Configure DHCP scopes recipe, in Chapter 8, Managing Windows Network Services.

How to do it...

Here you see how to configure Hyper-V networking:

  1. Get NIC details and any IP Address from the VM1 VM:
      Get-VMNetworkAdapter -VMName VM1
  1. Get VM networking details:
      $user = 'Localhost\Administrator' 
      $pass =  ConvertTo-SecureString -String 'Pa$$w0rd' `
               -AsPlainText -Force
      $cred = New-Object -TypeName...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}