Foreword |
|
xiii | |
Introduction |
|
xxxiii | |
|
Chapter 1 Setting Up a PowerShell 7 Environment |
|
|
1 | (36) |
|
What Is New in PowerShell 7 |
|
|
2 | (1) |
|
Systems Used in This Book and Chapter |
|
|
3 | (2) |
|
|
4 | (1) |
|
|
4 | (1) |
|
Systems in Use for This Chapter |
|
|
4 | (1) |
|
|
5 | (9) |
|
|
6 | (1) |
|
Enabling the Execution Policy |
|
|
6 | (1) |
|
Installing the Latest Version of NuGet and PowerShellGet |
|
|
6 | (1) |
|
|
7 | (1) |
|
Downloading the PowerShell |
|
|
7 | (1) |
|
|
7 | (1) |
|
Viewing Installation File Help Information |
|
|
8 | (1) |
|
|
8 | (1) |
|
Examining the Installation Folder |
|
|
9 | (1) |
|
Viewing Module Folder Locations |
|
|
10 | (1) |
|
Viewing Profile File Locations |
|
|
11 | (1) |
|
|
12 | (1) |
|
Viewing New Locations for Module Folders |
|
|
13 | (1) |
|
Viewing New Locations for Profile Files |
|
|
13 | (1) |
|
Creating a Current User/Current Host Profile |
|
|
14 | (1) |
|
Installing and Configuring VS Code |
|
|
14 | (7) |
|
|
15 | (1) |
|
Downloading the VS Code Installation Script |
|
|
15 | (1) |
|
Installing VS Code and Extensions |
|
|
16 | (1) |
|
Creating a Sample Personal Profile File |
|
|
17 | (1) |
|
Downloading the Cascadia Code Font |
|
|
17 | (1) |
|
Installing the Cascadia Code Font in Windows |
|
|
18 | (1) |
|
Updating VS Code User Settings |
|
|
18 | (1) |
|
Creating a Shortcut to VS Code |
|
|
19 | (1) |
|
Creating a Shortcut to the PowerShell 7 Console |
|
|
19 | (1) |
|
|
20 | (1) |
|
Importing the New Layout.XML File |
|
|
20 | (1) |
|
Using the PowerShell Gallery |
|
|
21 | (3) |
|
|
22 | (1) |
|
Discovering PowerShell Gallery Modules |
|
|
22 | (1) |
|
Determining the Modules That Support NET Core |
|
|
23 | (1) |
|
|
23 | (1) |
|
Installing the NTFSSecurity Module |
|
|
24 | (1) |
|
Viewing Available Commands |
|
|
24 | (1) |
|
Creating a Local PowerShellGet Repository |
|
|
24 | (6) |
|
|
24 | (1) |
|
Creating the Repository Folder |
|
|
25 | (1) |
|
Sharing the Repository Folder |
|
|
26 | (1) |
|
Creating a Module Working Folder |
|
|
26 | (1) |
|
|
26 | (1) |
|
Loading and Testing the Module |
|
|
27 | (1) |
|
Creating a Module Manifest |
|
|
27 | (1) |
|
|
28 | (1) |
|
Viewing Configured Repositories |
|
|
28 | (1) |
|
|
29 | (1) |
|
Viewing the Repository Folder |
|
|
29 | (1) |
|
|
30 | (1) |
|
Creating a Code-Signing Environment |
|
|
30 | (5) |
|
|
31 | (1) |
|
Creating a Self-Signed Certificate |
|
|
31 | (1) |
|
|
31 | (1) |
|
|
32 | (1) |
|
|
32 | (1) |
|
Attempting to Run the Script |
|
|
32 | (1) |
|
|
33 | (1) |
|
Copying a Certificate to the Trusted Publisher Certificate and Trusted Root Stores |
|
|
33 | (1) |
|
|
34 | (1) |
|
|
34 | (1) |
|
Testing the Script's Digital Signature |
|
|
35 | (1) |
|
|
35 | (2) |
|
Chapter 2 PowerShell 7 Compatibility with Windows PowerShell |
|
|
37 | (18) |
|
System Used in This Chapter |
|
|
38 | (1) |
|
Examining PowerShell Modules |
|
|
38 | (10) |
|
Understanding Module Types |
|
|
39 | (1) |
|
Importing PowerShell Modules |
|
|
40 | (1) |
|
Using PowerShell Module Manifests |
|
|
41 | (1) |
|
|
42 | (1) |
|
Creating a Module with Multiple Versions |
|
|
43 | (1) |
|
|
44 | (2) |
|
|
46 | (1) |
|
Viewing the Module Analysis Cache |
|
|
47 | (1) |
|
Introducing the Compatibility Solution |
|
|
48 | (3) |
|
Using the Module Load Deny List |
|
|
50 | (1) |
|
Things That Do Not Work with PowerShell 7 |
|
|
51 | (3) |
|
Windows PowerShell Incompatibilities |
|
|
51 | (3) |
|
Compatibility Issue Work-Arounds |
|
|
54 | (1) |
|
|
54 | (1) |
|
Chapter 3 Managing Active Directory |
|
|
55 | (56) |
|
Systems Used in This Chapter |
|
|
58 | (2) |
|
Establishing a Forest Root Domain |
|
|
60 | (6) |
|
|
60 | (1) |
|
Importing the Server Manager Module |
|
|
60 | (1) |
|
Installing the AD Domain Services Feature |
|
|
61 | (1) |
|
Loading the AD DS Deployment Module Explicitly |
|
|
61 | (1) |
|
Creating a Forest Root Domain Controller |
|
|
62 | (1) |
|
|
63 | (1) |
|
Viewing the Directory Server Entry (DSE) |
|
|
63 | (1) |
|
Viewing Details of the New AD DS Forest |
|
|
64 | (1) |
|
Getting Details of the Domain |
|
|
65 | (1) |
|
|
65 | (1) |
|
|
66 | (4) |
|
|
67 | (1) |
|
Importing the Server Manager Module |
|
|
67 | (1) |
|
Checking Network Connectivity |
|
|
67 | (1) |
|
Adding the AD DS Features on 1X12 |
|
|
68 | (1) |
|
|
69 | (1) |
|
|
69 | (1) |
|
Reviewing DCs in Reskit.Org Domain |
|
|
69 | (1) |
|
Viewing the Reskit.Org Domain |
|
|
70 | (1) |
|
Installing a Child Domain |
|
|
70 | (5) |
|
|
71 | (1) |
|
Importing the Server Manager Module |
|
|
71 | (1) |
|
Verifying That DC1 Can Be Resolved |
|
|
71 | (1) |
|
Adding the AD DS Features to UKDC1 |
|
|
72 | (1) |
|
Creating the Child Domain |
|
|
73 | (1) |
|
Viewing the Updated AD Forest |
|
|
73 | (1) |
|
|
74 | (1) |
|
Configuring a Cross-Forest Trust |
|
|
75 | (11) |
|
|
76 | (1) |
|
Importing the Server Manager Module |
|
|
76 | (1) |
|
Installing the AD Domain Services Feature and Management Tools |
|
|
76 | (1) |
|
Testing Network Connectivity with DC1 |
|
|
77 | (1) |
|
Importing the AD DS Deployment Module |
|
|
77 | (1) |
|
|
78 | (1) |
|
View Kapoho.Com Forest Details |
|
|
78 | (1) |
|
Adjusting the DNS to Resolve Reskit.Org from KAPDC1 |
|
|
79 | (1) |
|
Testing Conditional DNS Forwarding |
|
|
80 | (1) |
|
Setting Up a Conditional Forwarder on Reskit.Org |
|
|
80 | (1) |
|
Create Credentials to Run a Command on DC1 |
|
|
81 | (1) |
|
|
81 | (1) |
|
Invoking the Script Block on DC1 |
|
|
81 | (1) |
|
Getting the Domain Detail Objects |
|
|
82 | (1) |
|
Viewing the Reskit Forest Details |
|
|
83 | (1) |
|
Viewing the Kapoho Forest Details |
|
|
83 | (1) |
|
Establishing a Cross-Forest Trust |
|
|
84 | (1) |
|
Creating a Script Block to Adjust the ACL of a File on DC1 |
|
|
84 | (1) |
|
Running the Script Block on DC1 to Demonstrate the Cross-Forest Trust |
|
|
85 | (1) |
|
Managing AD Users, Computers, and OUs |
|
|
86 | (9) |
|
|
87 | (1) |
|
Creating a Hash Table for General User Attributes |
|
|
87 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
Adding Two Additional Users |
|
|
89 | (1) |
|
|
90 | (1) |
|
Removing a User with a Get | Remove Pattern |
|
|
90 | (1) |
|
|
91 | (1) |
|
Updating and Displaying a User Object |
|
|
91 | (1) |
|
|
92 | (1) |
|
Creating and Viewing Group Membership |
|
|
93 | (1) |
|
Make a New Group for the IT Team |
|
|
93 | (1) |
|
Make All Users in IT Members of the IT Team Group |
|
|
94 | (1) |
|
Displaying Group Membership |
|
|
94 | (1) |
|
Adding a Computer to the AD |
|
|
95 | (5) |
|
Displaying Computers in an AD Domain |
|
|
95 | (1) |
|
Adding Users to AD via a CSV |
|
|
96 | (1) |
|
|
96 | (1) |
|
|
97 | (1) |
|
Importing and Viewing the CSV |
|
|
97 | (1) |
|
|
98 | (1) |
|
Viewing All Users in Reskit.Org |
|
|
98 | (2) |
|
Configuring Just Enough Administration QEA) |
|
|
100 | (9) |
|
|
101 | (1) |
|
Creating a Transcript Folder |
|
|
101 | (1) |
|
Creating a Role Capabilities Folder |
|
|
101 | (1) |
|
Creating a Role Capabilities File |
|
|
101 | (1) |
|
Creating a JEA Session Configuration File |
|
|
102 | (1) |
|
Testing the Session Configuration File |
|
|
103 | (1) |
|
Enabling Remoting and Creating the JEA Session Endpoint |
|
|
103 | (1) |
|
Checking What the User Can Do |
|
|
104 | (1) |
|
Creating Credentials for JerryG |
|
|
105 | (1) |
|
Creating Three Script Blocks to Test JEA |
|
|
105 | (1) |
|
How Many Commands Exist in a JEA Session? |
|
|
106 | (1) |
|
Invoking a JEA-Defined Function |
|
|
107 | (1) |
|
Get the DNSServer Command Available in JEA Session |
|
|
107 | (1) |
|
Viewing the Transcripts Folder |
|
|
107 | (1) |
|
Examining a JEA Transcript |
|
|
108 | (1) |
|
|
109 | (2) |
|
Chapter 4 Managing Networking |
|
|
111 | (34) |
|
Systems Used in This Chapter |
|
|
112 | (1) |
|
Configuring IP Addressing |
|
|
113 | (4) |
|
|
114 | (1) |
|
|
114 | (1) |
|
Configuring an IP Address |
|
|
115 | (1) |
|
Verifying the New IP Address |
|
|
115 | (1) |
|
Setting DNS Server Details |
|
|
116 | (1) |
|
Validating the New IP Configuration |
|
|
116 | (1) |
|
Testing Network Connectivity |
|
|
117 | (4) |
|
|
117 | (1) |
|
Verifying That SRV2 and Loopback Are Working |
|
|
117 | (1) |
|
Testing Connectivity to the DC |
|
|
118 | (1) |
|
Checking Connectivity to the SMB and LDAP Ports |
|
|
119 | (1) |
|
Examining the Path to a Remote Server |
|
|
119 | (2) |
|
Installing the DHCP Service |
|
|
121 | (3) |
|
|
121 | (1) |
|
Installing the DHCP Feature |
|
|
121 | (1) |
|
Authorizing the DHCP Server in the AD |
|
|
122 | (1) |
|
Completing the DHCP Configuration |
|
|
123 | (1) |
|
Restarting the DHCP Service |
|
|
123 | (1) |
|
Checking the DHCP Service |
|
|
123 | (1) |
|
|
124 | (4) |
|
|
125 | (1) |
|
|
125 | (1) |
|
Getting Scopes from the DHCP Server |
|
|
125 | (1) |
|
Configuring Server-wide Options |
|
|
126 | (1) |
|
Configuring Scope-Specific Options |
|
|
126 | (1) |
|
Testing the DHCP Service in Operation |
|
|
127 | (1) |
|
Configuring DHCP Failover |
|
|
128 | (5) |
|
|
128 | (1) |
|
Installing the DHCP Server Feature on DC2 |
|
|
128 | (1) |
|
Letting DHCP Know It Is Fully Configured on DC2 |
|
|
129 | (1) |
|
Authorizing the Second DHCP Server in AD |
|
|
129 | (1) |
|
Viewing Authorized DHCP Servers |
|
|
129 | (1) |
|
Configuring DHCP Failover and Load Balancing |
|
|
130 | (1) |
|
Viewing Active Leases from Both DHCP Servers |
|
|
131 | (1) |
|
Viewing DHCP Server Statistics |
|
|
132 | (1) |
|
Configuring the DNS Service |
|
|
133 | (5) |
|
|
134 | (1) |
|
Installing the DNS Feature on DC2 |
|
|
134 | (1) |
|
Configuring the DNS Service |
|
|
135 | (1) |
|
Viewing Key DNS Server Options |
|
|
136 | (2) |
|
Configuring DNS Zones and Resource Records |
|
|
138 | (6) |
|
|
139 | (1) |
|
Creating a DNS Forward Lookup Zone |
|
|
139 | (1) |
|
Creating a Reverse Lookup Zone |
|
|
139 | (1) |
|
Registering DNS Records for DC1, DC2 |
|
|
140 | (1) |
|
Checking the DNS Zones on DO |
|
|
140 | (1) |
|
Adding DNS RR to the Cookham.Net Zone |
|
|
141 | (1) |
|
Restarting the DNS Service |
|
|
142 | (1) |
|
Checking the DNS RRs in the Cookham.Net Zone |
|
|
142 | (1) |
|
Testing DNS Server Resolution |
|
|
143 | (1) |
|
|
144 | (1) |
|
Chapter 5 Managing Storage |
|
|
145 | (46) |
|
Systems Used in This Chapter |
|
|
146 | (1) |
|
Managing Disks and Volumes |
|
|
147 | (7) |
|
|
147 | (1) |
|
Getting Information about Physical Disks in SRV1 |
|
|
148 | (1) |
|
Initializing the New Disks |
|
|
149 | (1) |
|
Viewing the Initialized Disks |
|
|
149 | (1) |
|
Creating an F: Volume in Disk 1 |
|
|
150 | (1) |
|
Creating a Partition in Disk 2 |
|
|
150 | (1) |
|
Creating a Second Partition |
|
|
151 | (1) |
|
|
151 | (1) |
|
|
152 | (1) |
|
Getting Partitions on SRV1 |
|
|
153 | (1) |
|
|
154 | (1) |
|
Managing NTFS Permissions |
|
|
154 | (9) |
|
|
155 | (1) |
|
Downloading and Installing the NTFSSecurity Module |
|
|
155 | (1) |
|
Finding Commands in the NTFS Security Module |
|
|
156 | (1) |
|
Creating a New Folder and File |
|
|
157 | (1) |
|
Viewing the Default Folder ACL |
|
|
157 | (1) |
|
Viewing the Default ACL on File |
|
|
158 | (1) |
|
|
159 | (1) |
|
Displaying the Sales Group |
|
|
159 | (1) |
|
Adding Full Control for Domain Admins |
|
|
160 | (1) |
|
Removing the Default File ACE |
|
|
160 | (1) |
|
Removing a Folder's Inherited Rights |
|
|
161 | (1) |
|
Adding Sales Group Access to the Folder |
|
|
161 | (1) |
|
Viewing Permissions on the Folder |
|
|
162 | (1) |
|
Viewing Permissions on the File |
|
|
162 | (1) |
|
|
163 | (12) |
|
|
163 | (2) |
|
|
165 | (1) |
|
Measuring the New Content |
|
|
165 | (1) |
|
Checking Content on the Target |
|
|
166 | (1) |
|
Adding the Storage Replica Feature to the Source |
|
|
166 | (1) |
|
|
167 | (1) |
|
Adding Storage Replica to the Target |
|
|
167 | (1) |
|
|
168 | (1) |
|
Testing the Configuration of SR |
|
|
168 | (1) |
|
Viewing the Topology Test Report |
|
|
169 | (1) |
|
Creating a Storage Replica Partnership |
|
|
170 | (1) |
|
|
171 | (1) |
|
Examining Volumes on the Target |
|
|
172 | (1) |
|
Reversing the Replication |
|
|
173 | (1) |
|
Viewing Updated Replication Group Status |
|
|
173 | (1) |
|
|
174 | (1) |
|
Managing Filestore Quotas |
|
|
175 | (8) |
|
|
175 | (1) |
|
Installing the FS Resource Manager Feature |
|
|
175 | (1) |
|
Setting Up SMTP Settings for FSRM |
|
|
176 | (1) |
|
|
176 | (2) |
|
Creating an FSRM Quota Template |
|
|
178 | (1) |
|
Viewing Available FSRM Quota Templates |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
179 | (1) |
|
|
180 | (1) |
|
|
180 | (1) |
|
Test the 85% Quota Threshold |
|
|
181 | (1) |
|
|
181 | (1) |
|
Testing the Hard Quota Limit |
|
|
181 | (2) |
|
Viewing the Folder Contents |
|
|
183 | (1) |
|
|
183 | (7) |
|
|
184 | (1) |
|
Examining Existing FSRM File Groups |
|
|
184 | (1) |
|
Examining the Existing File Screen Templates |
|
|
184 | (2) |
|
Creating a New File Folder |
|
|
186 | (1) |
|
Creating a New File Screen |
|
|
186 | (1) |
|
|
187 | (1) |
|
Setting Up an Active File Screen |
|
|
187 | (1) |
|
Viewing Notification Limits |
|
|
188 | (1) |
|
Changing Notification Limits |
|
|
189 | (1) |
|
Testing the Active File Screen |
|
|
189 | (1) |
|
Viewing Active File Screen Email |
|
|
189 | (1) |
|
|
190 | (1) |
|
Chapter 6 Managing Shared Data |
|
|
191 | (40) |
|
Systems Used in This Chapter |
|
|
193 | (1) |
|
Setting Up and Securing an SMB File Server |
|
|
194 | (4) |
|
|
194 | (1) |
|
Adding File Server Features to FS1 |
|
|
194 | (1) |
|
Getting SMB Server Settings |
|
|
195 | (1) |
|
Ensuring That SMB1 Is Disabled |
|
|
195 | (2) |
|
Enabling SMB Signing and SMB Encryption |
|
|
197 | (1) |
|
|
197 | (1) |
|
Turning Off Server Announcements |
|
|
198 | (1) |
|
Restarting the SMB Server Service |
|
|
198 | (1) |
|
Reviewing the Updated SMB Server Configuration |
|
|
198 | (1) |
|
Creating and Securing SMB Shares |
|
|
198 | (9) |
|
|
199 | (1) |
|
|
200 | (1) |
|
Discovering Existing SMB Shares |
|
|
200 | (1) |
|
|
200 | (1) |
|
Setting a Share Description |
|
|
201 | (1) |
|
Setting the Folder Enumeration Mode |
|
|
201 | (1) |
|
Requiring Encryption for a Share |
|
|
201 | (1) |
|
Removing All Access to Salesl Share |
|
|
202 | (1) |
|
Adding ReskitADomain Admins to the Share |
|
|
202 | (1) |
|
Adding System Full Access |
|
|
203 | (1) |
|
Giving the Creator/Owner Full Access |
|
|
203 | (1) |
|
Granting the Sales Group Access |
|
|
203 | (1) |
|
|
204 | (1) |
|
Reviewing the NTFS Permissions |
|
|
204 | (1) |
|
Setting the NTFS ACL to Match the Share |
|
|
205 | (1) |
|
Removing NTFS Inheritance |
|
|
205 | (1) |
|
|
206 | (1) |
|
Creating and Using an iSCSI Target |
|
|
207 | (11) |
|
|
208 | (1) |
|
Installing the iSCSI Target Feature on SRV2 |
|
|
209 | (1) |
|
Exploring iSCSI Target Server Settings |
|
|
210 | (1) |
|
Creating a Folder on SRV2 |
|
|
210 | (1) |
|
Creating an iSCSI Virtual Disk |
|
|
211 | (1) |
|
Creating the iSCSI Target on SRV2 |
|
|
212 | (1) |
|
Creating iSCSI Disk Target Mapping on SRV2 |
|
|
213 | (1) |
|
Configuring the iSCSI Service on SRV2 |
|
|
213 | (1) |
|
Setting Up the iSCSI Portal |
|
|
213 | (1) |
|
Viewing the SalesTarget iSCSI Disk |
|
|
214 | (1) |
|
Connecting to the Target on SRV2 |
|
|
215 | (1) |
|
Viewing the iSCSI Virtual Disk |
|
|
216 | (1) |
|
Setting the Disk Online and Making It Read/Write |
|
|
216 | (1) |
|
|
216 | (1) |
|
Using the iSCSI Drive on FS1 |
|
|
217 | (1) |
|
Setting Up a Clustered Scale-Chat File Server |
|
|
218 | (11) |
|
|
218 | (1) |
|
Setting Up the iSCSI Portal for FS2 |
|
|
219 | (1) |
|
Configuring the iSCSI Portal for FS2 |
|
|
219 | (2) |
|
Adding the File Server Role to FS2 |
|
|
221 | (1) |
|
Adding Clustering Features to FS1/FS2 |
|
|
221 | (1) |
|
|
222 | (1) |
|
Testing the Cluster Nodes |
|
|
222 | (1) |
|
Viewing Cluster Validation Test Results |
|
|
222 | (2) |
|
|
224 | (1) |
|
Configuring a Quorum Share on DC1 |
|
|
224 | (1) |
|
Setting the Cluster Witness |
|
|
225 | (1) |
|
Ensuring that iSCSI Disks Are Connected |
|
|
225 | (1) |
|
Adding the iSCSI Disk to the Cluster |
|
|
225 | (1) |
|
Moving the iSCSI Disk into the CSV |
|
|
226 | (1) |
|
Adding the SOFS Role to the Cluster |
|
|
226 | (1) |
|
|
227 | (1) |
|
Adding a Continuously Available Share |
|
|
227 | (1) |
|
|
228 | (1) |
|
|
229 | (2) |
|
Chapter 7 Managing Printing |
|
|
231 | (20) |
|
Systems Used in This Chapter |
|
|
232 | (1) |
|
Installing and Sharing Printers |
|
|
233 | (5) |
|
|
234 | (1) |
|
Installing the Print Server Feature on PSRV |
|
|
234 | (1) |
|
Creating a Folder for the Print Drivers |
|
|
235 | (1) |
|
Downloading Printer Drivers |
|
|
235 | (1) |
|
|
235 | (1) |
|
|
236 | (1) |
|
Adding a New Printer Port |
|
|
236 | (1) |
|
|
237 | (1) |
|
|
237 | (1) |
|
Reviewing the Printer Configuration |
|
|
237 | (1) |
|
Publishing a Printer in AD |
|
|
238 | (2) |
|
|
238 | (1) |
|
Getting the Printer Object |
|
|
239 | (1) |
|
Checking the Initial Publication Status |
|
|
239 | (1) |
|
Publishing the Printer to AD |
|
|
239 | (1) |
|
Viewing the Printer Publication Status |
|
|
240 | (1) |
|
Changing the Spool Folder |
|
|
240 | (5) |
|
|
241 | (1) |
|
Loading the System.Printing Namespace |
|
|
241 | (1) |
|
Displaying the Initial Spool Folder |
|
|
241 | (1) |
|
Defining Required Permissions |
|
|
242 | (1) |
|
Creating a Print Server Object |
|
|
242 | (1) |
|
Creating a New Spool Folder |
|
|
242 | (1) |
|
Changing the Spool Folder Path |
|
|
242 | (1) |
|
|
243 | (1) |
|
Restarting the Spooler Service |
|
|
243 | (1) |
|
Reviewing the Spooler Folder |
|
|
243 | (1) |
|
Creating Another Spool Folder |
|
|
244 | (1) |
|
Stopping the Spooler Service |
|
|
244 | (1) |
|
Configuring the New Spool Folder |
|
|
244 | (1) |
|
|
244 | (1) |
|
|
245 | (1) |
|
|
245 | (3) |
|
|
245 | (1) |
|
Getting Printer Objects from WMI |
|
|
246 | (1) |
|
Displaying the Number of Printers Defined |
|
|
246 | (1) |
|
Getting the Sales Group Printer WMI Object |
|
|
246 | (1) |
|
Display the Printer's Details |
|
|
247 | (1) |
|
|
247 | (1) |
|
|
248 | (1) |
|
|
248 | (1) |
|
|
248 | (1) |
|
Creating the Printer Pool for SalesPrinterl |
|
|
248 | (1) |
|
Viewing Resulting Details |
|
|
249 | (1) |
|
|
249 | (2) |
|
Chapter 8 Managing Hyper-V |
|
|
251 | (64) |
|
Systems Used in This Chapter |
|
|
253 | (1) |
|
Installing and Configuring Hyper-V |
|
|
254 | (3) |
|
|
254 | (1) |
|
Installing the Hyper-V Feature on HV1 |
|
|
255 | (1) |
|
|
255 | (1) |
|
Creating Folders to Hold VM Disks and VM Details |
|
|
255 | (1) |
|
Building a Configuration Hash Table |
|
|
256 | (1) |
|
Reviewing Key VM Host Settings |
|
|
256 | (1) |
|
|
257 | (5) |
|
|
257 | (1) |
|
|
257 | (1) |
|
Verifying That the ISO Image Exists |
|
|
258 | (1) |
|
Importing the DISM Module |
|
|
258 | (1) |
|
|
259 | (1) |
|
Viewing ISO Image Contents |
|
|
259 | (1) |
|
|
260 | (1) |
|
Creating a VHDX File for the VM |
|
|
260 | (1) |
|
|
261 | (1) |
|
Adding the ISO Image to the VM |
|
|
261 | (1) |
|
|
261 | (1) |
|
Installing Windows Server 2019 |
|
|
261 | (1) |
|
|
262 | (1) |
|
|
262 | (3) |
|
|
262 | (1) |
|
Creating Variables for Use in This Section |
|
|
262 | (1) |
|
Displaying Details of HVDirect VM |
|
|
263 | (1) |
|
Invoking a Command using VMName |
|
|
263 | (1) |
|
Invoking a Command Based on VM ID |
|
|
264 | (1) |
|
Configuring VM Networking |
|
|
265 | (6) |
|
|
265 | (1) |
|
Getting Virtual NIC Details from HVDirect |
|
|
265 | (1) |
|
Creating a Credential for the VM |
|
|
266 | (1) |
|
|
266 | (1) |
|
Creating a Virtual Switch |
|
|
267 | (1) |
|
Connecting the VM to the Switch |
|
|
267 | (1) |
|
|
268 | (1) |
|
Viewing VM Network Information |
|
|
268 | (1) |
|
Viewing IP Address Inside HVDirect |
|
|
268 | (1) |
|
Joining the Reskit Domain |
|
|
269 | (1) |
|
|
270 | (1) |
|
Getting the Host Name of the HVDirect VM |
|
|
271 | (1) |
|
|
271 | (6) |
|
|
272 | (1) |
|
Turning Off the HVDirect VM |
|
|
272 | (1) |
|
Setting the Hardware Startup Order |
|
|
273 | (1) |
|
|
273 | (1) |
|
|
274 | (1) |
|
Adding an SCSI Controller |
|
|
275 | (1) |
|
|
275 | (1) |
|
Creating a New Virtual Disk |
|
|
275 | (1) |
|
|
276 | (1) |
|
Viewing SCSI Disks inside HVDirect |
|
|
277 | (1) |
|
Implementing Nested Virtualization |
|
|
277 | (5) |
|
|
277 | (1) |
|
|
277 | (1) |
|
Configuring Virtual Processor |
|
|
278 | (1) |
|
Enabling MAC Address Spoofing |
|
|
278 | (1) |
|
|
279 | (1) |
|
|
279 | (1) |
|
Installing Hyper-V in HVDirect VM |
|
|
280 | (1) |
|
|
280 | (1) |
|
Checking Hyper-V in HVDirect |
|
|
281 | (1) |
|
|
282 | (9) |
|
|
282 | (1) |
|
|
283 | (1) |
|
Examining C: in the HVDirect VM |
|
|
283 | (1) |
|
|
284 | (1) |
|
Examining the Checkpoint Files |
|
|
284 | (1) |
|
Creating Content in HVDirect |
|
|
285 | (1) |
|
Taking a Second Checkpoint |
|
|
286 | (1) |
|
Viewing Checkpoint Details for HVDirect |
|
|
286 | (1) |
|
Examining Files Supporting Checkpoints |
|
|
286 | (1) |
|
Creating Another File in HVDirect |
|
|
287 | (1) |
|
|
287 | (1) |
|
|
288 | (1) |
|
Rolling Forward to Checkpoint2 |
|
|
289 | (1) |
|
Viewing VM Files After Rolling Forward |
|
|
289 | (1) |
|
Viewing Checkpoints in the VM |
|
|
290 | (1) |
|
|
291 | (1) |
|
Checking VM Data Files after Removing Checkpoints |
|
|
291 | (1) |
|
|
291 | (14) |
|
|
292 | (1) |
|
Configuring HV1 and HV2 for Delegation |
|
|
293 | (1) |
|
|
294 | (1) |
|
|
294 | (1) |
|
Enabling Replication from the Source VM |
|
|
294 | (1) |
|
Viewing VM Replication Status |
|
|
295 | (1) |
|
|
296 | (1) |
|
|
296 | (1) |
|
Examining Initial Replication State |
|
|
296 | (1) |
|
|
297 | (1) |
|
|
297 | (1) |
|
Viewing VM Status on HV2 after Failover |
|
|
298 | (1) |
|
Getting VM Details from HV1 |
|
|
298 | (1) |
|
Getting VM Details from HV2 |
|
|
299 | (1) |
|
Stopping the Failover Test |
|
|
300 | (1) |
|
|
301 | (1) |
|
Setting Failover IP Address for VM Failover |
|
|
301 | (1) |
|
|
302 | (1) |
|
Starting Failover from HV1 to HV2 |
|
|
302 | (1) |
|
Completing the Failover of HVDirect |
|
|
303 | (1) |
|
|
303 | (1) |
|
Checking VM Status After Failover |
|
|
303 | (1) |
|
Testing Failover VM Networking |
|
|
304 | (1) |
|
|
305 | (6) |
|
|
305 | (1) |
|
|
305 | (1) |
|
Getting VM Configuration Location |
|
|
306 | (1) |
|
Getting VM Hard Drive Locations |
|
|
306 | (1) |
|
|
307 | (1) |
|
Viewing Configuration Details |
|
|
307 | (1) |
|
|
308 | (1) |
|
|
308 | (1) |
|
|
308 | (1) |
|
Migrating a VM Between Hosts |
|
|
309 | (1) |
|
Displaying Migration Time |
|
|
309 | (1) |
|
|
310 | (1) |
|
|
310 | (1) |
|
Examining Virtual Disk Details |
|
|
310 | (1) |
|
Measuring VM Resource Usage |
|
|
311 | (3) |
|
|
311 | (1) |
|
|
312 | (1) |
|
Enabling VM Resource Monitoring |
|
|
312 | (1) |
|
|
312 | (1) |
|
Creating Credentials for HVDirect |
|
|
313 | (1) |
|
Getting Initial Resource Measurements |
|
|
313 | (1) |
|
|
313 | (1) |
|
Measuring VM Resource Usage Again |
|
|
314 | (1) |
|
|
314 | (1) |
|
Chapter 9 Using WMI with CIM Cmdlets |
|
|
315 | (42) |
|
Reviewing WMI Architecture in Windows |
|
|
317 | (1) |
|
|
318 | (1) |
|
|
319 | (1) |
|
Systems Used in This Chapter |
|
|
320 | (1) |
|
|
320 | (8) |
|
Viewing Classes in the Root Namespace |
|
|
320 | (1) |
|
Viewing Namespaces Below the Root |
|
|
321 | (1) |
|
Enumerating Classes in root\CIMV2 |
|
|
321 | (2) |
|
Discovering All Namespaces in WMI |
|
|
323 | (1) |
|
Viewing Some WMI Namespaces |
|
|
324 | (1) |
|
|
324 | (1) |
|
Viewing Namespaces on a Remote Server |
|
|
325 | (1) |
|
Counting Namespaces/Classes on SRV2 |
|
|
326 | (1) |
|
Counting Namespaces/Classes on DC2 |
|
|
327 | (1) |
|
|
328 | (2) |
|
Examining the Win32 Snare Class |
|
|
328 | (1) |
|
|
329 | (1) |
|
|
329 | (1) |
|
Viewing Class Details in a Specified Namespace |
|
|
330 | (1) |
|
Getting Local and Remote Objects |
|
|
330 | (4) |
|
|
331 | (1) |
|
Getting Objects from a Non-default Namespace |
|
|
331 | (1) |
|
|
332 | (1) |
|
|
333 | (1) |
|
Getting Remote WMI Objects |
|
|
334 | (1) |
|
|
334 | (5) |
|
Reviewing Static Methods of a Class |
|
|
335 | (1) |
|
Reviewing Properties of a Class |
|
|
335 | (1) |
|
|
336 | (1) |
|
Viewing the SMB Share Using Get-SMBShare |
|
|
337 | (1) |
|
Viewing the SMB Share Using Get-Cimlnstance |
|
|
338 | (1) |
|
|
338 | (1) |
|
|
339 | (8) |
|
|
340 | (1) |
|
Running a Windows Process |
|
|
340 | (1) |
|
|
341 | (1) |
|
|
341 | (1) |
|
Unregistering for a WMI Event |
|
|
341 | (1) |
|
Creating an Extrinsic Event Registration |
|
|
342 | (1) |
|
|
343 | (1) |
|
Unregister the Registry Event |
|
|
344 | (1) |
|
|
344 | (1) |
|
Defining a WQL Event Query |
|
|
344 | (1) |
|
Creating a Temporary WMI Event Subscription |
|
|
345 | (1) |
|
Adding to the Enterprise Admins Group |
|
|
345 | (1) |
|
|
346 | (1) |
|
Unregistering the WMI Event |
|
|
346 | (1) |
|
Implementing Permanent WMI Event Handling |
|
|
347 | (8) |
|
|
349 | (1) |
|
Defining Helper Functions |
|
|
349 | (1) |
|
|
350 | (1) |
|
|
350 | (1) |
|
Creating a Script for the Event Handler to Run: Monitor.psl |
|
|
351 | (1) |
|
Creating an Event Consumer |
|
|
351 | (1) |
|
Binding Event Filter and Event Consumer |
|
|
352 | (1) |
|
Displaying Event Filter Details |
|
|
353 | (1) |
|
|
353 | (1) |
|
|
354 | (1) |
|
Removing Event Filter Details from WMI |
|
|
354 | (1) |
|
|
355 | (2) |
|
|
357 | (46) |
|
Systems Used in This Chapter |
|
|
358 | (1) |
|
Reporting on AD Users and Computers |
|
|
359 | (6) |
|
|
360 | (1) |
|
Defining a Function to Retrieve User Accounts |
|
|
360 | (1) |
|
|
361 | (1) |
|
Building the Report Header |
|
|
361 | (1) |
|
Reporting on Disabled Users |
|
|
361 | (1) |
|
Reporting on Unused Accounts |
|
|
362 | (1) |
|
Reporting on Invalid Password Attempts |
|
|
362 | (1) |
|
Determining Privileged Users |
|
|
362 | (1) |
|
Adding Privileged Users to the Report |
|
|
363 | (1) |
|
|
364 | (1) |
|
Managing Filesystem Reporting |
|
|
365 | (9) |
|
|
366 | (1) |
|
Creating a Storage Report |
|
|
366 | (1) |
|
|
367 | (1) |
|
Viewing FSRM Report Output Files |
|
|
368 | (1) |
|
Viewing the Large Files Report |
|
|
368 | (1) |
|
|
369 | (1) |
|
Creating a Scheduled FSRM Report Task |
|
|
370 | (1) |
|
Creating the Scheduled Report |
|
|
371 | (1) |
|
Viewing the Report Scheduled Task |
|
|
371 | (1) |
|
Running the Report Interactively |
|
|
372 | (1) |
|
|
372 | (2) |
|
Removing the Reports and Scheduled Task |
|
|
374 | (1) |
|
Collecting Performance Information Using PLA |
|
|
374 | (5) |
|
|
375 | (1) |
|
Creating a Data Collector |
|
|
375 | (1) |
|
|
375 | (1) |
|
Adding the Performance Counters to the Collector Set |
|
|
376 | (1) |
|
|
376 | (1) |
|
Creating and Starting the Data Collector Set |
|
|
376 | (1) |
|
Creating a Second Data Collector Set |
|
|
377 | (1) |
|
Viewing the Collector Sets |
|
|
378 | (1) |
|
Reporting on PLA Performance Data |
|
|
379 | (3) |
|
|
379 | (1) |
|
Importing the Performance Counters |
|
|
379 | (1) |
|
Importing Performance Counter Data |
|
|
379 | (1) |
|
Fixing the Data Collection Problem |
|
|
380 | (1) |
|
|
380 | (1) |
|
Determining the 95th Percentile |
|
|
380 | (1) |
|
Combining CPU Measurements |
|
|
381 | (1) |
|
Displaying CPU Statistics |
|
|
381 | (1) |
|
Creating a Performance Monitoring Graph |
|
|
382 | (3) |
|
|
382 | (1) |
|
Loading the Forms Assembly |
|
|
382 | (1) |
|
Importing Performance Data |
|
|
382 | (1) |
|
|
383 | (1) |
|
Defining Chart Dimensions |
|
|
383 | (1) |
|
|
383 | (1) |
|
Identifying the Date/Time Column |
|
|
383 | (1) |
|
Adding Performance Data to the Chart |
|
|
384 | (1) |
|
|
384 | (1) |
|
|
384 | (1) |
|
Creating a System Diagnostics Report |
|
|
385 | (2) |
|
|
385 | (1) |
|
Starting the Built-in Data Collector |
|
|
385 | (1) |
|
Waiting for Data Collector to Finish |
|
|
386 | (1) |
|
Saving the Report as HTML |
|
|
386 | (1) |
|
Viewing the System Diagnostics Report |
|
|
386 | (1) |
|
Reporting on Printer Usage |
|
|
387 | (3) |
|
|
388 | (1) |
|
Turning on Print Job Logging |
|
|
388 | (1) |
|
Defining a Get-PrinterUsage Function |
|
|
388 | (1) |
|
|
389 | (1) |
|
|
389 | (1) |
|
|
390 | (1) |
|
Creating a Hyper-V Status Report |
|
|
390 | (5) |
|
|
391 | (1) |
|
Creating a Basic Report Object Hash Table |
|
|
391 | (1) |
|
Adding Host Details to the Report |
|
|
391 | (1) |
|
Adding PowerShell and OS Version |
|
|
391 | (1) |
|
|
392 | (1) |
|
|
392 | (1) |
|
Adding Total Hyper-V Host Physical Memory |
|
|
393 | (1) |
|
Adding Memory Assigned to VMs |
|
|
393 | (1) |
|
Creating the Host Report Object |
|
|
393 | (1) |
|
Creating the Report Header |
|
|
393 | (1) |
|
Adding the Report Object to the Report |
|
|
393 | (1) |
|
Creating an Array for the VM Details |
|
|
394 | (1) |
|
|
394 | (1) |
|
|
394 | (1) |
|
|
395 | (1) |
|
|
395 | (7) |
|
|
397 | (1) |
|
|
397 | (1) |
|
Getting the Total Number of Event Records |
|
|
397 | (1) |
|
Getting Event Counts in Key Logs |
|
|
398 | (1) |
|
Getting All Windows Security Log Events |
|
|
399 | (1) |
|
|
399 | (1) |
|
Creating a Logon Type Summary |
|
|
400 | (1) |
|
Displaying Logon Events by Logon Type |
|
|
401 | (1) |
|
|
401 | (1) |
|
|
402 | (1) |
Index |
|
403 | |