Book Image

Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

By : Thomas Lee, Ed Goad
Book Image

Windows Server 2016 Automation with PowerShell Cookbook - Second Edition

By: Thomas Lee, Ed Goad

Overview of this book

This book showcases several ways that Windows administrators can use to automate and streamline their job. You'll start with the PowerShell and Windows Server fundamentals, where you'll become well versed with PowerShell and Windows Server features. In the next module, Core Windows Server 2016, you'll implement Nano Server, manage Windows updates, and implement troubleshooting and server inventories. You'll then move on to the Networking module, where you'll manage Windows network services and network shares. The last module covers Azure and DSC, where you will use Azure on PowerShell and DSC to easily maintain Windows servers.
Table of Contents (21 chapters)
Title Page
Credits
About the Author
Acknowledgment
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Using an iSCSI target


In the previous recipe, you created an iSCSI target. In this recipe, you will implement an iSCSI initiator that enables you to use the iSCSI target across the iSCSI network. You use the iSCSI feature included in Windows Server 2016 (and Windows 10) to access the target. Note that, by default, the iSCSI initiator does not start automatically. To use an initiator on an iSCSI client computer, you have to start the service (msiscsi) and enable the service to start on reboot automatically.

Getting ready

This recipe, which you run on server FS1, assumes you have created an iSCSI target as shown on the Creating an iSCSI target recipe.

How to do it...

  1. Adjust the startup type and start the service:
Set-Service -Ma,e msiscsi -StartupType 'Automatic'Start-Service =Name msiscsi
  1. Add the iSCSI portal:
New-IscsiTargetPortal `
                  -TargetPortalAddress Srv1.Reskit.Org `              -TargetPortalPortNumber 3260
  1. Find the SalesTarget iSCSI target on the portal:
$Target = Get-IscsiTarget...