The first blog post, simple to write a few words, slowly add to the back.
The following prerequisites for the execution of the commands are:
You have the authority, this does not have to explain more.
Active Directory and PowerShell module installed on the computer where the command was executed
Unlock account:
Import-module Activedirectoryunlock-adaccount Zhangsan
Import-module activedirectoryunlock-adaccount zhangsan-server 51cto.comunlock-adaccount zhangsan-server Dc1.51cto.com
Create a shortcut
Save the following command as a. bat or. com shortcut, without everyone knowing the PowerShell, as long as the mouse can be used.
Without cumbersome to open the Active Directory Manager, search account information, instantly locate unlock account.
@echo Off&powershell-noexit-command "&{import-module activedirectory; Unlock-adaccount (read-host ' Enter the login account to unlock ')-server dc1.51cto.com} "
This article from "Live is to insist" blog, please be sure to keep this source http://dustyone.blog.51cto.com/2471340/1749398
Helpdesk Required PowerShell statements