O'Reilly logo

Instant Windows PowerShell Guide by Harshul Patel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  1. The following command statement adds the Member01 server to PSDomain using the PSDomain\PSAdmin credential and restarts the machine once added. It also uses the Force parameter, so it doesn't ask for confirmation.
    PS C:\>Add-Computer -ComputerName Member01 -LocalCredential Member01\Admin01 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required