Administer the system (Intermediate)
So far, we have covered changes to the settings in Windows PowerShell Version 3.0 in a general way. Now, let's try to capture how Version 3.0 is useful to the system administrator regarding the ease of working with the console. This recipe consists of multiple subrecipes.
Getting ready
The Add-Computer
CMDLET is used for adding a local computer to a domain or workgroup.
How to do it...
Try executing the following code sequence:
- The following command statement adds the
Member01
server toPSDomain
using thePSDomain\PSAdmin
credential and restarts the machine once added. It also uses theForce
parameter, so it doesn't ask for confirmation.PS C:\>Add-Computer -ComputerName Member01 -LocalCredential Member01\Admin01 ...
Get Instant Windows PowerShell Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.