大网数据广告活动
域与目录服务

Use the Active Directory Administrative Center Windows PowerShell History Viewer in Windows Server

· 52CE 我爱测

Learn how to use the Windows PowerShell History Viewer in Active Directory Administrative Center to construct Windows PowerShell scripts.

Active Directory Administrative Center now provides a complete history of all the Windows PowerShell cmdlets it runs and their arguments and values. You can copy the cmdlet history elsewhere for learning, modification, and re-use. You can create task notes to assist with understanding what your Active Directory Administrative Center commands resulted in Windows PowerShell. You can also filter the history to find points of interest.

In this article, you'll learn how to use the Windows PowerShell History Viewer in Active Directory Administrative Center (ADAC) to construct a Windows PowerShell script.

Prerequisites

Before you can use the Windows PowerShell History Viewer in Active Directory Administrative Center (ADAC), you need to complete the following prerequisites.

  • You must be using a supported version of Windows Server. To learn more about supported versions of Windows Server, see Release information.

  • You must have the following Remote Server Administration Tools (RSAT) installed:

    • Active Directory Administrative Center (ADAC)

    • Active Directory module for Windows PowerShell.

  • Have a basic understanding of Windows PowerShell. For example, you need to know how piping in Windows PowerShell works. For more information about piping in Windows PowerShell, see about_Pipelines.

Construct a script

The Active Directory Administrative Center Windows PowerShell History Viewer's purpose is for you to learn through practical experience. As actions are executed in the user interface, the equivalent Windows PowerShell command is shown to the user in Windows PowerShell History Viewer.

Using the Active Directory Administrative Center (ADAC), create a user and then use the Windows PowerShell History Viewer to construct a Windows PowerShell script.

  1. Sign in to a computer that has the Active Directory module for Windows PowerShell installed.

  2. Open Active Directory Administrative Center, either from the Tools menu of the Server Manager console or by running an elevated PowerShell session and typing dsac.exe.

  3. Select the appropriate target domain in the navigation pane.

  4. Navigate to the organizational unit where you want to create the user.

  5. In the Tasks pane, under Users, select New, then User.

  6. Fill in the required fields and click OK.

  7. Expand the Windows PowerShell History pane at the bottom of the ADAC screen.

  8. Review the command that was just generated, copy it, and paste it into your desired editor to construct your script. For example, you can now modify the command to create a different user, or create a user in a different organizational unit.

You can repeat this process for other tasks in Active Directory Administrative Center.

Related content

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 09/05/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。