PowerShell utilization has always been daunting for IT professionals.  While there are a great many resources to assist IT Professionals in learning PowerShell, some simply are more comfortable with enabling functionality via the Windows Server 2012 R2 GUI.  Time is never on an IT administrator’s side, however, PowerShell can address this conundrum through the automation capabilities it provides.  One tool that can quicken PowerShell adoption is actually available from within the Windows Server 2012 R2 Management console.  PowerShell Shell History Viewer in Windows Server 2012 R2 assists the learning process allowing administrators to take advantage of the cmdlets by copy and pasting cmdlets created through actions completed via the Server Manager GUI.

The Windows Server 2012 Active Directory Administrative Center (ADAC) makes the process of viewing cmdlets history quite easy as it can be completed via a few simple steps.  In this example Windows PowerShell History Viewer will be utilized in ADAC to construct a Windows PowerShell script that will add users to a group.
 
Remember to complete this lab in your lab environment. Click here to learn how to create your own lab.
 

  1. Right click the Windows PowerShell icon, click Run as Administrator
     
  2. Open the Windows Server 2012 Active Directory Administrative Center
     

     
  3. Click Manage, click Add Navigation Nodes and select the appropriate target domain in the Add Navigation Nodes dialog box and then click OK.
     
  4. Expand the Windows PowerShell History pane at the bottom of the ADAC screen.
     
  5. Select a user. <Suggestion would be to create a new one to move if you have not done so already>
     
  6. Click Add to group… in the Tasks pane.
     
  7. Navigate to the desire group you wish to move the user to and click OK in the dialog box.
     
  8. Navigate to the Windows PowerShell History pane and locate the command just generated.
     

     
  9. Copy the command and paste it into your desired editor to construct your script.

This now allows an IT administrator to modify the command to be able to add a different user to a desired group without memorizing the required cmdlets. PowerShell can be a great time saver for any IT professional.