Introduction |
|
xvii | |
|
Part I Command Prompt Basics |
|
|
|
Chapter 1 Launching the Using the Command Prompt |
|
|
1 | (8) |
|
Launching the Command Prompt |
|
|
1 | (1) |
|
Launching with Elevated Privileges |
|
|
2 | (1) |
|
Using the Built-in doskey Program |
|
|
3 | (2) |
|
Creating Mini Macros with doskey |
|
|
5 | (1) |
|
Cutting and Pasting to and from the Command Prompt |
|
|
5 | (2) |
|
Copying from the Command Prompt Window |
|
|
6 | (1) |
|
Pasting Data to the Command Prompt Window |
|
|
6 | (1) |
|
Changing the Options and Display |
|
|
7 | (2) |
|
Chapter 2 Basic Rules When Using the Command Prompt |
|
|
9 | (12) |
|
Using Uppercase or Lowercase |
|
|
9 | (1) |
|
|
10 | (1) |
|
|
11 | (2) |
|
|
13 | (1) |
|
|
13 | (1) |
|
|
14 | (3) |
|
|
17 | (1) |
|
|
18 | (1) |
|
Redirecting Output to Files |
|
|
19 | (2) |
|
Chapter 3 Manipulating Files, Folders, and Shares |
|
|
21 | (16) |
|
Copying Files with copy, xcopy, and robocopy |
|
|
21 | (5) |
|
|
21 | (1) |
|
|
22 | (1) |
|
|
23 | (3) |
|
Compressing Files with compact |
|
|
26 | (1) |
|
Encrypting Files with cipher |
|
|
27 | (1) |
|
Manipulating Shadow Copies with vssadmin |
|
|
28 | (3) |
|
Manipulating Shares with net share |
|
|
31 | (1) |
|
Mapping Drives with net use |
|
|
32 | (1) |
|
Manipulating Users and Groups with the net Command |
|
|
33 | (1) |
|
Modifying NTFS Permissions with icacls |
|
|
34 | (3) |
|
Chapter 4 Creating Batch Files |
|
|
37 | (10) |
|
|
37 | (1) |
|
Giving Feedback with echo |
|
|
38 | (1) |
|
|
39 | (2) |
|
Calling Another Batch File with call |
|
|
41 | (1) |
|
Clearing the Screen with els |
|
|
42 | (1) |
|
Changing the Order of Processing with goto |
|
|
42 | (1) |
|
Checking Conditions with if |
|
|
43 | (4) |
|
Part II Managing and Troubleshooting DNS |
|
|
|
|
47 | (8) |
|
Retrieving DNS Information |
|
|
47 | (2) |
|
|
49 | (1) |
|
|
49 | (1) |
|
|
49 | (1) |
|
Working with DNS Partitions |
|
|
50 | (1) |
|
|
51 | (2) |
|
Creating and Deleting DNS Records |
|
|
53 | (2) |
|
|
55 | (8) |
|
Verifying Records with nslookup |
|
|
55 | (3) |
|
Configuring DNS for nslookup |
|
|
58 | (1) |
|
Using nslookup Without PTR Records |
|
|
59 | (1) |
|
Using nslookup Without a Reverse Lookup Zone |
|
|
60 | (3) |
|
Part III Managing and Troubleshooting Active Directory |
|
|
|
Chapter 7 Using Basic ds Commands |
|
|
63 | (8) |
|
Understanding Distinguished Names |
|
|
63 | (2) |
|
Adding Objects with dsadd |
|
|
65 | (2) |
|
Modifying Accounts with dsmod |
|
|
67 | (2) |
|
Moving Accounts with dsmove |
|
|
69 | (1) |
|
Removing Objects with dsrm |
|
|
70 | (1) |
|
Chapter 8 Using Advanced ds Commands |
|
|
71 | (6) |
|
Retrieving Information about Objects with dsquery |
|
|
71 | (2) |
|
Retrieving Information About Objects with dsget |
|
|
73 | (2) |
|
Viewing and Modifying AD Permissions with dsacls |
|
|
75 | (2) |
|
Chapter 9 Promoting and Demoting a Domain Controller (DC) |
|
|
77 | (10) |
|
Promoting a DC with dcpromo |
|
|
77 | (2) |
|
Demoting a DC with dcpromo |
|
|
79 | (1) |
|
Using dcpromo with an unattend File |
|
|
80 | (1) |
|
Promoting a DC to an RODC with an Existing Account |
|
|
81 | (2) |
|
Using dcpromo to Install from Media |
|
|
83 | (1) |
|
Forcing Removal of Active Directory |
|
|
84 | (3) |
|
Chapter 10 Working with the Schema |
|
|
87 | (4) |
|
Modifying the Schema with adprep |
|
|
87 | (1) |
|
Registering the Active Directory Schema Snap-In |
|
|
88 | (3) |
|
Chapter 11 Working with Active Directory Accounts |
|
|
91 | (10) |
|
Using ldifde to Export, Import, and Delete Accounts |
|
|
91 | (4) |
|
Using csvde to Export and Import Accounts |
|
|
95 | (2) |
|
Redirecting Computer Accounts |
|
|
97 | (1) |
|
Redirecting User Accounts |
|
|
98 | (3) |
|
Chapter 12 Using ntdsutil |
|
|
101 | (10) |
|
Resetting the Directory Services Restore Mode Password |
|
|
101 | (1) |
|
Changing the Garbage Collection Logging Level |
|
|
102 | (1) |
|
Moving Active Directory to a Different Drive |
|
|
103 | (1) |
|
Defragmenting Active Directory |
|
|
104 | (1) |
|
Performing an Authoritative Restore |
|
|
105 | (2) |
|
Removing a Domain Controller from Active Directory |
|
|
107 | (1) |
|
Seizing an Operations Master Role |
|
|
108 | (3) |
|
|
111 | (8) |
|
Identifying Operations Master Roles |
|
|
111 | (1) |
|
Joining a Computer to a Domain |
|
|
111 | (2) |
|
Verifying Trust Relationships |
|
|
113 | (3) |
|
Querying and Resetting Secure Channels with netdom |
|
|
116 | (3) |
|
Chapter 14 Troubleshooting Replication |
|
|
119 | (8) |
|
Checking Replication with repadmin |
|
|
119 | (2) |
|
Forcing Replication with repadmin |
|
|
121 | (2) |
|
Migrating to DFSR with dfsrmig |
|
|
123 | (4) |
|
Part IV Group Policy and the Command Line |
|
|
|
Chapter 15 Group Policy Overview |
|
|
127 | (16) |
|
Launching the Group Policy Management Console |
|
|
127 | (1) |
|
Understanding Group Policy Order of Precedence |
|
|
128 | (2) |
|
Filtering GPOs by Modifying Permissions |
|
|
130 | (2) |
|
Understanding Group Policy Settings |
|
|
132 | (6) |
|
Enabling Auditing Through Group Policy |
|
|
132 | (2) |
|
Enabling Advanced Auditing for Directory Services Changes |
|
|
134 | (1) |
|
|
135 | (2) |
|
Configuring Automatic Updates |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
138 | (1) |
|
Using Loopback Processing |
|
|
139 | (1) |
|
Running Scripts with Group Policy |
|
|
140 | (3) |
|
Chapter 16 Group Policy Command-Line Tools |
|
|
143 | (6) |
|
Viewing Group Policy Settings with gpresult |
|
|
143 | (3) |
|
Refreshing Group Policy Settings with gpupdate |
|
|
146 | (3) |
|
Chapter 17 Security Configuration Wizard |
|
|
149 | (6) |
|
Understanding the Security Configuration Wizard |
|
|
149 | (2) |
|
|
151 | (4) |
|
Part V Configuring Server Core |
|
|
|
Chapter 18 Configuring Server Core after Installation |
|
|
155 | (8) |
|
|
155 | (1) |
|
Restoring the Command Prompt |
|
|
156 | (1) |
|
|
157 | (1) |
|
Logging Off, Shutting Down, and Rebooting |
|
|
158 | (1) |
|
|
159 | (1) |
|
Setting the Time, Date, and Time Zone |
|
|
160 | (1) |
|
|
161 | (2) |
|
Chapter 19 Adding Roles to Server Core |
|
|
163 | (8) |
|
Understanding the Supported Roles |
|
|
163 | (1) |
|
Using ocsetup to Add Roles to Windows Server 2008 |
|
|
164 | (3) |
|
Adding the DHCP Server Role with ocsetup |
|
|
165 | (1) |
|
Adding the DNS Server Role with ocsetup |
|
|
166 | (1) |
|
Adding File Services with ocsetup |
|
|
166 | (1) |
|
Adding the Print Services Role with ocsetup |
|
|
166 | (1) |
|
Adding the Web Server (IIS) Role with pkgmgr |
|
|
166 | (1) |
|
Using dism to Add Roles to Windows Server 2008 R2 |
|
|
167 | (3) |
|
Adding the DHCP Server Role with dism |
|
|
168 | (1) |
|
Adding the DNS Server Role with dism |
|
|
168 | (1) |
|
Adding File Services with dism |
|
|
169 | (1) |
|
Adding the Print and Document Services Role with dism |
|
|
169 | (1) |
|
Adding the AD CS Role with dism |
|
|
169 | (1) |
|
Adding the AD LDS Role with dism |
|
|
169 | (1) |
|
Adding PowerShell with dism |
|
|
170 | (1) |
|
|
170 | (1) |
|
Chapter 20 Configuring Server Core for Remote Administration |
|
|
171 | (6) |
|
Using the Server Core Registry Editor |
|
|
171 | (2) |
|
Enabling Access with Remote Microsoft Management Consoles (MMCs) |
|
|
173 | (2) |
|
Configuring the Firewall to Reply to Ping |
|
|
175 | (2) |
|
Part VI Managing and Maintaining Windows Server 2008 and Windows Server 2008 R2 |
|
|
|
Chapter 21 Manipulating Services |
|
|
177 | (10) |
|
Stopping and Starting Services with the net Command |
|
|
177 | (1) |
|
Manipulating Services with sc |
|
|
178 | (3) |
|
Manipulating Services with wmic |
|
|
181 | (6) |
|
Configuring the Firewall to Allow wmic |
|
|
181 | (1) |
|
Using the wmic service list Command |
|
|
182 | (1) |
|
Using the wmic service call Command |
|
|
183 | (4) |
|
Chapter 22 Basic Routing on a Server |
|
|
187 | (6) |
|
Viewing the Routing Table with route print |
|
|
187 | (2) |
|
Adding Routes to the Routing Table with route add |
|
|
189 | (2) |
|
Modifying Routes in the Routing Table with route change |
|
|
191 | (1) |
|
Deleting Routes from the Routing Table with route delete |
|
|
192 | (1) |
|
Chapter 23 Working with Printers |
|
|
193 | (8) |
|
Publishing Printers to Active Directory with pubprn.vbs |
|
|
193 | (3) |
|
Migrating Printers with printbrm |
|
|
196 | (1) |
|
Controlling the Print Queue with prnqctl.vbs |
|
|
197 | (4) |
|
Chapter 24 Licensing and Activation |
|
|
201 | (8) |
|
Managing Activation Tasks with slmgr |
|
|
201 | (4) |
|
Managing Basic Tasks with slmgr |
|
|
201 | (1) |
|
Viewing License Information with slmgr |
|
|
202 | (1) |
|
Managing KMS Servers with slmgr |
|
|
203 | (1) |
|
Using KMS Activation Keys |
|
|
204 | (1) |
|
Managing KMS Clients with slmgr |
|
|
204 | (1) |
|
Forcing Registration of KMS Server SRV Records |
|
|
205 | (1) |
|
Manually Creating an SRV Record for KMS |
|
|
206 | (3) |
|
|
209 | (10) |
|
|
209 | (1) |
|
Understanding netsh Contexts |
|
|
210 | (4) |
|
Configuring IPv4 with netsh |
|
|
214 | (3) |
|
Configuring an IPv6 Address with netsh |
|
|
217 | (1) |
|
Disabling IPv6 in Windows Server 2008 |
|
|
218 | (1) |
|
Chapter 26 Working with Event Subscriptions |
|
|
219 | (12) |
|
Enabling the Source Computer with winrm |
|
|
219 | (1) |
|
Enabling the Collector Computer with wecutil |
|
|
220 | (1) |
|
Adding an Account to the Event Log Readers Group |
|
|
221 | (2) |
|
Enabling and Testing Event Subscriptions |
|
|
223 | (3) |
|
Managing Subscriptions with wecutil |
|
|
226 | (2) |
|
Logging Events with eventcreate |
|
|
228 | (3) |
|
|
231 | (10) |
|
Adding wbadmin to a Server |
|
|
231 | (1) |
|
Backing Up System State Data with wbadmin |
|
|
232 | (1) |
|
Restoring System State Data with wbadmin |
|
|
233 | (2) |
|
Restoring System State Data on a Domain Controller with wbadmin |
|
|
235 | (1) |
|
Backing Up Volumes with wbadmin |
|
|
236 | (2) |
|
Restoring Volumes with wbadmin |
|
|
238 | (3) |
|
Part VII Troubleshooting Windows Server 2008 and Windows Server 2008 R2 |
|
|
|
Chapter 28 Troubleshooting Networking Issues |
|
|
241 | (12) |
|
Viewing and Manipulating TCP/IP Configuration with ipconfig |
|
|
241 | (6) |
|
Checking Connectivity with ping |
|
|
247 | (4) |
|
Viewing the Router Path with tracert |
|
|
251 | (1) |
|
Checking for Data Loss with pathping |
|
|
251 | (2) |
|
Chapter 29 Using the Reliability and Performance Monitor |
|
|
253 | (8) |
|
Gathering Information from the Reliability Monitor |
|
|
253 | (3) |
|
Running System Data Collector Sets |
|
|
256 | (2) |
|
Writing a Script to Run Data Collector Sets |
|
|
258 | (1) |
|
Scheduling a Script to Run Data Collector Sets |
|
|
259 | (2) |
|
Chapter 30 Using Network Monitor and nmcap |
|
|
261 | (8) |
|
Installing Network Monitor |
|
|
261 | (1) |
|
Starting and Using Network Monitor |
|
|
262 | (2) |
|
Using nmcap to Capture Traffic |
|
|
264 | (1) |
|
Automatically Starting, Stopping, and Terminating nmcap |
|
|
265 | (2) |
|
|
267 | (1) |
|
Enabling Promiscuous Mode in nmcap |
|
|
268 | (1) |
|
Part VIII Terminal Services and Remote Desktop Services |
|
|
|
Chapter 31 Remote Desktop Services |
|
|
269 | (8) |
|
Adding the Remote Desktop Services Role |
|
|
269 | (3) |
|
Viewing and Manipulating the Install Mode with change user |
|
|
272 | (1) |
|
Modifying Logon Capabilities with change logon |
|
|
272 | (1) |
|
Connecting and Disconnecting Sessions with tscon and tsdiscon |
|
|
273 | (1) |
|
Identifying Open Sessions with query user or quser |
|
|
274 | (1) |
|
Resetting Sessions with reset session |
|
|
275 | (2) |
|
Chapter 32 Remote Administration |
|
|
277 | (6) |
|
Configuring, Verifying, and Removing winrm |
|
|
277 | (1) |
|
Using winrs to Issue Commands |
|
|
278 | (2) |
|
Connecting to Remote Systems with mstsc |
|
|
280 | (3) |
|
Part IX Working with Some Server Roles from the Command Line |
|
|
|
Chapter 33 Using Windows Deployment Services |
|
|
283 | (10) |
|
|
283 | (2) |
|
|
285 | (1) |
|
Adding Boot Images to WDS with wdsutil |
|
|
285 | (1) |
|
Creating Image Groups Using wdsutil |
|
|
286 | (1) |
|
Adding Install Images Using wdsutil |
|
|
286 | (2) |
|
Configuring Server Properties Using wdsutil |
|
|
288 | (2) |
|
|
290 | (1) |
|
Running sysprep from the Command Line |
|
|
291 | (2) |
|
Chapter 34 Manipulating IIS with appcmd |
|
|
293 | (4) |
|
Managing Sites with appcmd |
|
|
293 | (1) |
|
Adding a Site with appcmd |
|
|
294 | (1) |
|
Adding an Application to a Site with add app |
|
|
295 | (1) |
|
Adding a Virtual Directory with add vdir |
|
|
295 | (1) |
|
Starting and Stopping Application Pools with appcmd and appcmd stop |
|
|
296 | (1) |
|
Part X Using Visual Basic Scripts (VB Script) |
|
|
|
Chapter 35 Creating Basic Visual Basic Scripts |
|
|
297 | (8) |
|
Working with filesystemobject |
|
|
297 | (3) |
|
Accessing a Network Share with filesystemobject |
|
|
300 | (1) |
|
Calling Scripts from a Batch File |
|
|
300 | (1) |
|
Displaying a Message Box with a Visual Basic Script |
|
|
300 | (2) |
|
|
302 | (1) |
|
Checking for a Value with a Message Box |
|
|
302 | (3) |
|
Chapter 36 Manipulating Active Directory with Visual Basic Scripts |
|
|
305 | (6) |
|
Connecting to Active Directory with a VB Script |
|
|
305 | (1) |
|
Creating an OU with a VB Script |
|
|
305 | (1) |
|
Creating a User Account with a VB Script |
|
|
306 | (1) |
|
Modifying the Tombstone Lifetime |
|
|
307 | (4) |
|
|
|
Chapter 37 Starting and Using PowerShell |
|
|
311 | (20) |
|
Installing and Launching PowerShell |
|
|
311 | (1) |
|
Understanding PowerShell Verbs and Nouns |
|
|
312 | (4) |
|
Tabbing Through PowerShell Commands |
|
|
316 | (2) |
|
Understanding the Different Types of PowerShell Commands |
|
|
318 | (1) |
|
|
318 | (1) |
|
Discovering Windows PowerShell Commands |
|
|
318 | (2) |
|
|
320 | (2) |
|
Redirecting Output with Windows PowerShell |
|
|
322 | (1) |
|
Understanding PowerShell Errors |
|
|
323 | (1) |
|
Understanding PowerShell Variables |
|
|
324 | (3) |
|
Using Comparison Operators |
|
|
327 | (1) |
|
|
327 | (4) |
|
Chapter 38 Creating and Running a PowerShell Script |
|
|
331 | (16) |
|
Setting the Security Context |
|
|
331 | (1) |
|
Creating a PowerShell Profile |
|
|
332 | (2) |
|
Creating and Modifying the Global PowerShell Profile |
|
|
334 | (2) |
|
Running PowerShell Scripts |
|
|
336 | (1) |
|
Logging Processes with a get-process Script |
|
|
337 | (1) |
|
Testing for the Existence of a File |
|
|
338 | (2) |
|
|
340 | (1) |
|
Running a Script Against Multiple Computers |
|
|
341 | (3) |
|
Scheduling PowerShell Scripts |
|
|
344 | (3) |
|
Chapter 39 Using the Integrated Scripting Environment |
|
|
347 | (10) |
|
|
347 | (1) |
|
|
348 | (2) |
|
Executing Commands in the ISE |
|
|
350 | (1) |
|
Creating and Saving a Script in the ISE |
|
|
351 | (6) |
|
Chapter 40 Using PowerShell to Manage Active Directory |
|
|
357 | (8) |
|
Using the Active Directory Module in Windows Server 2008 R2 |
|
|
357 | (2) |
|
Creating and Manipulating Objects in Windows Server 2008 |
|
|
359 | (2) |
|
Creating an OU with PowerShell |
|
|
359 | (1) |
|
Creating a User with PowerShell |
|
|
359 | (1) |
|
Moving Objects with PowerShell |
|
|
360 | (1) |
|
Working with the Domain Object |
|
|
361 | (1) |
|
Working with the system.directoryservices Namespace |
|
|
362 | (1) |
|
Creating a List of Domain Computers |
|
|
363 | (2) |
Appendix Create Your Own Journal Here |
|
365 | |