Windows Server 2008 R2: Server Management and PowerShell V2

Similar documents
Windows Server 2008 R2: What's New in Active Directory

Microsoft IT Camp Hands-On Lab

Windows Server 2008 R2: Active Directory and Server Manager Remoting

During your session you will have access to the following lab configuration.

Windows Server 2012 R2 Storage Infrastructure

Unidesk 3.0 Script to Increase UEP Size for Persistent Desktops

A layman s guide to PowerShell 2.0 remoting. Ravikanth Chaganti

Active Directory Deployment and Management Enhancements

Installing and Configuring Login PI

Administration Guide. . All right reserved. For more information about Specops Gpupdate and other Specops products, visit

Preparing an IIS Server for EmpowerID installation

Microsoft. Jump Start. M3: Managing Windows Server 2012 by Using Windows PowerShell 3.0

Avatier Identity Management Suite

Click Studios. Passwordstate. Password Discovery, Reset and Validation. Requirements

Migrating Active Directory to Windows Server 2012 R2

Introduction to DirectAccess in Windows Server 2012

Microsoft Windows PowerShell v2 For Administrators

Acknowledgments Finding Your Way Around Windows PowerShell p. 1 Getting Started with Windows PowerShell p. 3 Installing Windows PowerShell p.

How To Configure A Windows 8.1 On A Windows (Windows) With A Powerpoint (Windows 8) On A Blackberry) On An Ipad Or Ipad (Windows 7) On Your Blackberry Or Black

LAB 1: Installing Active Directory Federation Services

DEPLOYMENT GUIDE DEPLOYING F5 AUTOMATED NETWORK PROVISIONING FOR VMWARE INFRASTRUCTURE

Installing OneStop Reporting Products

Hands-On Lab. Lab 01: Getting Started with SharePoint Lab version: Last updated: 2/23/2011

How to Create a Delegated Administrator User Role / To create a Delegated Administrator user role Page 1

PROJECTIONS SUITE. Database Setup Utility (and Prerequisites) Installation and General Instructions. v0.9 draft prepared by David Weinstein

Good Morning Wireless! SSID: MSFTOPEN No Username or Password Required

Tools & Techniques for Remote Help Desk Support

User Manual. Onsight Management Suite Version 5.1. Another Innovation by Librestream

Troubleshoot Using Event Log Mining

Microsoft Corporation. Project Server 2010 Installation Guide

Release Note RM Unify CSV Extraction Tool

Lab A: Deploying and Managing Software by Using Group Policy Answer Key

603: Enhancing mobile device experience with NetScaler MobileStream Hands-on Lab Exercise Guide

Buffalo Technology: Migrating your data to Windows Storage Server 2012 R2

Lab Answer Key for Module 1: Installing and Configuring Windows Server Table of Contents Lab 1: Configuring Windows Server

SPHOL325: SharePoint Server 2013 Search Connectors and Using BCS

Using DSC with Visual Studio Release Management

Exploring PowerShell. Using Windows PowerShell

Avaya Network Configuration Manager User Guide

Microsoft IAS Configuration for RADIUS Authorization

E2E Complete 4.1. Installation and Configuration Guide

Using SSH Secure Shell Client for FTP

Using Remote Desktop with the Cisco AnyConnect VPN Client in Windows Vista

Lab 1: Windows Azure Virtual Machines

Lab Sample Solutions. Chapter 3

vtcommander Installing and Starting vtcommander

TSM for Windows Installation Instructions: Download the latest TSM Client Using the following link:

Adobe Summit 2015 Lab 718: Managing Mobile Apps: A PhoneGap Enterprise Introduction for Marketers

TECHNICAL NOTE. The following information is provided as a service to our users, customers, and distributors.

NSi Mobile Installation Guide. Version 6.2

5nine Hyper-V Commander

Guide to deploy MyUSBOnly via Windows Logon Script Revision 1.1. Menu

Managing Linux Servers with System Center 2012 R2

INSTALLING MICROSOFT SQL SERVER AND CONFIGURING REPORTING SERVICES

VeriCentre 3.0 Upgrade Pre-Installation and Post Installation Guidelines

App Orchestration 2.0

Installing LearningBay Enterprise Part 2

Specops Command. Installation Guide

Installing Windows Server Update Services (WSUS) on Windows Server 2012 R2 Essentials

LT Auditor Windows Assessment SP1 Installation & Configuration Guide

WolfTech Active Directory: PowerShell

HIPAA Compliance Use Case

Network Load Balancing

INSTALL AND CONFIGURATION GUIDE. Atlas 5.1 for Microsoft Dynamics AX

GETTING STARTED Exclaimer Signature Manager Outlook Edition Overview How does it work? But That's Not All...

SPHOL205: Introduction to Backup & Restore in SharePoint Hands-On Lab. Lab Manual

How to Connect to Berkeley College Virtual Lab Using Windows

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Windows PowerShell. 3.0 Step by Step. Ed Wilson

Using Management Shell Reports and Tracking User Access in the NetVanta UC Server

ProjectWise Mobile Access Server, Product Preview v1.1

Deploying Personal Virtual Desktops by Using RemoteApp and Desktop Connection Step-by-Step Guide

Idera SQL Diagnostic Manager Management Pack Guide for System Center Operations Manager. Install Guide. Idera Inc., Published: April 2013

Deploying Microsoft Operations Manager with the BIG-IP system and icontrol

Working with SQL Server Integration Services

14.1. bs^ir^qfkd=obcib`qflk= Ñçê=emI=rkfuI=~åÇ=léÉåsjp=eçëíë

HOW TO SILENTLY INSTALL CLOUD LINK REMOTELY WITHOUT SUPERVISION

Quick Start Guide. User Manual. 1 March 2012

4cast Client Specification and Installation

BSDI Advanced Fitness & Wellness Software

Virtual Office Remote Installation Guide

Windows Azure Pack Installation and Initial Configuration

Changing Your Cameleon Server IP

How to Copy A SQL Database SQL Server Express (Making a History Company)

Backing Up and Recovering Your Server

Issue Tracking Anywhere Installation Guide

IIS, FTP Server and Windows

CTERA Agent for Windows

SECURE MOBILE ACCESS MODULE USER GUIDE EFT 2013

Introduction to Hyper-V High- Availability with Failover Clustering

Dell One Identity Cloud Access Manager How to Configure Microsoft Office 365

SUNGARD SUMMIT 2007 sungardsummit.com 1. Microsoft PowerShell. Presented by: Jeff Modzel. March 22, 2007 Course ID 453. A Community of Learning

Windows PowerShell Fundamentals

Worldspan Go! Internet Connection Office Management Instructions

Introduction to Unified Device Management with Intune and System Center Configuration Manager

Title: Setting Up A Site to Site VPN Between Microsoft Azure and the Corporate Network

Server Installation: ServerTools

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

Clearswift SECURE Exchange Gateway Installation & Setup Guide. Version 1.0

Trend Micro TM Worry-Free Business Security Services Integration with LabTech

Transcription:

Windows Server 2008 R2: Server Management and PowerShell V2

Table of Contents Windows Server 2008 R2: Server Management and PowerShell V2... 1 Exercise 1 Remote Management Using Server Manager... 2 Exercise 2 Using the Windows PowerShell Integrated Scripting Environment... 3 Exercise 3 Using Windows PowerShell V2... 6 Exercise 4 Managing Server Core using Windows PowerShell... 9

Windows Server 2008 R2: Server Management and PowerShell V2 Objectives Scenario Prerequisites Estimated Time to Complete This Lab Computers used in this Lab After completing this lab, you will be better able to: Use Server Manager to remotely manage a computer Use Windows PowerShell V2 Integrated Scripting Environment Work with Windows PowerShell background jobs Work with remote computers using Windows PowerShell Use transactions in Windows PowerShell Use PowerShell to manage Server Core Woodgrove Bank is an investment bank located in Denver, Colorado, USA. Woodgrove Bank has a main office and many regional and local branch offices. Many of the branch offices are small offices and do not have local IT support, and are connected to the main office by low-bandwidth WAN connections. In addition, many users at Woodgrove Bank travel between offices, as well as to customers offices and homes for meetings regarding client accounts. Woodgrove Bank is faced with the following global challenges: Management of many servers in many offices. The need to reduce the operational cost of each branch office. The need for roaming and remote users to access company resources. Management of a large and complex Active Directory infrastructure. To address some of these challenges, Woodgrove Bank has decided to make use of the new management tools and features included in Windows Server 2008 R2. Before working on this lab, you must have: The ability to work in a command line environment An understanding of WMI and.net concepts An understanding of Windows PowerShell concepts and tasks 60 Minutes BAL-DC-01 BAL-CORE-01 BAL-CLI-01 The password for the Administrator account on all computers in this lab is: Passw0rd! Page 1 of 10

Exercise 1 Remote Management Using Server Manager Scenario Server Manger now supports connections to remote servers to review the server s configuration. In this exercise, you will use Server Manager from a remote computer to manage the role and feature configuration of the server. Complete the following task on: BAL-DC-01 1. Enable Remote Management on BAL- DC-01 Complete the following task on: BAL-CLI-01 2. Enable Remote Management on BAL- CLI-01 Note: Begin this task logged on to BAL-DC-01 as Woodgrovebank\Administrator using the password Passw0rd! In this task you will enable remote management on both the client and the server. a. On BAL-DC-01, on the Taskbar, click Server Manager. b. In Server Manager click Server Manager (BAL-DC-01) and then under Server Summary, click Configure Server Manager Remote Management. c. Click Enable remote management of this server from other computers and then click OK. Note: Remote management can be enabled by running WinRM QuickConfig from the command prompt or by running Enable-PSRemoting from PowerShell. d. Close Server Manager. Note: In this task you will enable remote management on a Windows 7 client computer by enabling PowerShell remoting. Begin this task logged on to BAL-CLI-01 as Woodgrovebank\Administrator using the password Passw0rd! a. On the Start menu, navigate to All Programs/Accessories/Windows PowerShell and then click Windows PowerShell. b. In Windows PowerShell, type the following command and then press ENTER: Enable-PSRemoting c. Press Y and then press ENTER. d. Close Windows PowerShell. Page 2 of 10

Exercise 2 Using the Windows PowerShell Integrated Scripting Environment Scenario In this exercise you will use the Windows PowerShell Integrated Scripting Environment (ISE). As a reference, the major components of the ISE are labeled below. Use this diagram as a reference for the instructions in the remainder of this lab. Complete the following task on: BAL-CLI-01 1. Exploring Windows PowerShell ISE Note: In this task you will explore the user interface of the Windows PowerShell ISE to become familiar with how to execute common tasks. a. On the Start Menu, navigate to All Programs/Accessories/Windows PowerShell, and then click Windows PowerShell ISE. b. In the Command Pane, type Get-Process and then press ENTER. Note: The Command Pane title bar displays your current PS Drive and path. The results of the command are displayed in the output pane. c. In the Command Pane, type Get-EventLog and then press ENTER. d. In the dialog box, in Logname, type System and then press ENTER. Note: Cmdlets that require input parameters will prompt for the parameters using dialog boxes. e. Press the UP ARROW key to recall the previous command. Page 3 of 10

2. Working With Breakpoints f. Press the ESCAPE key to cancel the current command. g. In the Command Pane, type Get-EventLog System and then press ENTER. h. Click the STOP button in the Command Pane to terminate execution of the command. i. In the Script Pane, type the following script code: Note: While typing in the script editor, you may use TAB completion to complete commands such as Write-Output and Get-EventLog. $Log = System $Type = Warning $LogEntries = Get-EventLog $Log $LogEntries ForEach-Object { If ($_.EntryType eq $Type) { Write-Output The following was found in the event log Write-Output $_.TimeGenerated Write-Output $_.Source Write-Output $_.Message } } j. In the Script Pane, click the Play button to execute the script. Note: The script returns one or more event log entries. k. On the File menu, click Save. l. Save the script as EventScript.ps1. Note: In this task you will use breakpoints to modify the execution path of a script. Breakpoints provide a method of stopping a script in mid execution and allowing you to view and change items such as variables, which are stored in the script. a. In the Command Pane, type the following command and then press ENTER: Set-ExecutionPolicy RemoteSigned b. In the Execution Policy Change Windows, click Yes. c. In the Script Pane, click anywhere in line 4. d. On the debug menu, click Toggle Breakpoint. Note: Line 4 will be highlighted indicating a breakpoint has been set. e. In the Script Pane, click the Play button to execute the script. Note: The script stops execution on line 4 because of the breakpoint. f. In the Command Pane, type the following commands, pressing ENTER after each one: $Type $Type = Information $Type Note: These commands will display the value of the $Type variable from the script and then change it while the script is in break mode. Breakpoints allow you to pause the execution of a script and then display and change the values used by the script. g. On the Debug menu, click Disable All Breakpoints. Note: Disabling breakpoints allows them to be skipped, but does not remove them. h. On the Debug menu, click Run/Continue. Note: The script will complete execution, displaying Warning messages instead of the Error messages defined in the script code. Page 4 of 10

i. Close Windows PowerShell ISE. Page 5 of 10

Exercise 3 Using Windows PowerShell V2 Scenario In this exercise you will learn how to use three key new features in Windows PowerShell V2. You will begin by working with background jobs, which enable you to start a non-interactive process, and then check its status as it executes. Next you will work with transactions. Finally, you will explore the powerful remoting capabilities of Windows PowerShell V2. Complete the following task on: BAL-CLI-01 1. Using Transactions in Windows PowerShell V2 Note: In this task you will work with transactions in Windows PowerShell V2. Transactions are supported by select providers and allow you to make or undo changes as a group. You will use the registry provider to make changes to the registry that is included in a transaction. You will then perform both undo and commit operations. a. On the Start Menu, navigate to All Programs/Accessories/Windows PowerShell, and then click Windows PowerShell ISE. b. To identify which providers support transactions, in the Command Pane, type the following command and then press ENTER: Get-PSProvider * Note: Note the Capabilities column indicates that the Registry provider supports transactions. c. To create a new Registry container, in the Command Pane, type the following commands, pressing ENTER after each one: CD HKCU:\ New-Item Name App1 ItemType Container Force Set-Location App1 Get-Location Note: You will use this container to test the transaction features of Windows PowerShell V2. d. To display the available transaction commands and then start a new transaction, in the Command Pane, type the following commands, pressing ENTER after each one: Get-Command *Transaction* Start-Transaction e. To make changes that are captured as part of the transaction, in the Command Pane, type the following commands, pressing ENTER after each one: Get-ChildItem New-Item -Name Config -ItemType Container -Force UseTransaction New-Item -Name Parameters -ItemType Container -Force UseTransaction Get-ChildItem Get-ChildItem UseTransaction Note: The UseTransaction switch indicates which tasks are part of a defined Page 6 of 10

2. Using Remoting in Windows PowerShell V2 transaction. As you can see from the fourth command, any command that does not include the -UseTransactions switch is performed on the live data. f. To make the changes permanent by committing the transaction, in the Command Pane, type the following command and then press ENTER: Complete-Transaction Note: The Complete-Transaction Cmdlet rolls forward the transaction, making all changes permanent. g. To start a transaction, and undo the changes, in the Command Pane, type the following commands, pressing ENTER after each one: Start-Transaction Remove-Item Config -UseTransaction Get-ChildItem UseTransaction Get-ChildItem Undo-Transaction Get-ChildItem Note: The Undo-Transaction Cmdlet rolls back the transaction, undoing all changes. Note: In this task you will work with one of the most useful features in Windows PowerShell V2: remoting. Remoting is built on WMI remoting and allows you to both execute commands on, and work interactively with, remote PowerShell sessions. At the end of this task you will combine remoting with background jobs to execute a single command asynchronously across multiple computers. a. To run a command on a remote computer, in the Command Pane, type the following command and then press ENTER: Invoke-Command Computername BAL-DC-01 Command {get-process} b. To create two persistent connections, in the Command Pane, type the following commands, pressing ENTER after each one: $sessions = New-PSSession -ComputerName localhost, BAL-DC-01 $sessions Format-List c. To run commands on the remote sessions, in the Command Pane, type the following commands, pressing ENTER after each one: ICM -session $sessions -command {get-process c*} ICM -session $sessions -command {get-service where {$_.Status -eq 'Running'}} Note: ICM is a shortcut keystroke in Windows PowerShell which is short for Invoke- Command. d. To remove all active sessions, in the Command Pane, type the following command and then press ENTER: Remove-PSSession * e. To create an interactive session on a remote computer, in the Command Pane, type the following commands, pressing ENTER after each one: $session = New-PSSession -ComputerName BAL-DC-01 Enter-PSSession $session Hostname Ipconfig Import-Module ServerManager Get-WindowsFeature Get-WmiObject Win32_ComputerSystem Exit-PSSession Note: Interactive sessions are very powerful tools that give you direct command line Page 7 of 10

access to the remote computer and are conceptually similar to Telnet sessions. f. To run a command on multiple remote computers using background jobs, in the Command Pane, type the following commands, pressing ENTER after each one: Note: This example uses multiple instances of localhost for the purpose of this lab. You can replace localhost with the name of actual servers in your environment. There are two commands in this block. The second command wraps over two lines. $servers = "localhost", "localhost", "localhost" $servers foreach-object {start-job -scriptblock {ICM -computername $_ -command {get-eventlog -log system}} -name Remoteeventquery} Page 8 of 10

Exercise 4 Managing Server Core using Windows PowerShell Scenario In this exercise you will implement Windows PowerShell on Server Core. Server Core includes a customized copy of the Microsoft.NET Framework, sufficient to enable Windows PowerShell to function as a management tool on Server Core. Windows PowerShell includes the same functionality as it does on full installations, including the most important, remoting. Complete the following task on: BAL-CORE-01 1. Install Windows PowerShell on Server Core Complete the following task on: Note: In this task you will install Windows PowerShell on Server Core using the OCSETUP command. You will then enter Windows PowerShell to verify that it is working. Begin this task logged on to BAL-CORE-01 as Woodgrovebank\Administrator using the password Passw0rd! a. To see the available PowerShell components, type the following command in the command prompt, and then press ENTER: DISM /Online /Get-Features Find PowerShell Note: The command is case sensitive. Note that in addition to the core Windows PowerShell components, there are PowerShell components for Active Directoryand WOW64. b. To install Windows PowerShell, type the following command and then press ENTER: Note: The command is case sensitive. DISM /Online /Enable-Feature /Featurename:MicrosoftWindowsPowerShell c. To enter Windows PowerShell, type the following command and then press ENTER: C:\windows\system32\windowspowershell\v1.0\PowerShell.exe d. To enable remoting, in Windows PowerShell type the following command, and press ENTER: Enable-PSRemoting -force e. Press Y and then press ENTER. f. Press Y and then press ENTER. Note: Remoting may already be enabled on the VM. g. To verify that Windows PowerShell is functioning, type the following command and then press ENTER: Get-WmiObject Win32_ComputerSystem Note: The command will display basic computer information which verifies that Windows PowerShell is functioning. Note: In this task you will enable remoting in Windows PowerShell on Server Core and then connect to the instance of Windows PowerShell from a remote computer to view service information. Page 9 of 10

BAL-CLI-01 2. Perform Remote Management of Server Core using Windows PowerShell Begin this task logged on to BAL-CLI-01 as Woodgrovebank\Administrator using the password Passw0rd! and ensure that you have Windows PowerShell Integrated Scripting Environment (ISE) open. a. To query service information, in the Command Pane, type the following command and press ENTER: ICM ComputerName BAL-CORE-01 Command {Get-Service Where {$_.Status eq Running }} Note: This command displays the list of all running services on the BAL-CORE-01 computer using PowerShell remoting. Windows Server 2008 R2 with SP1 Free Trial Download Certification: Windows Server 2008 R2, Server Virtualization Page 10 of 10