Helpdesk Required PowerShell statements

Source: Internet
Author: User

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:

    1. You have the authority, this does not have to explain more.

    2. Active Directory and PowerShell module installed on the computer where the command was executed


Unlock account:

    • Single-Domain environment:

Import-module Activedirectoryunlock-adaccount Zhangsan
    • Multi-domain forest environment

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.