In this small series, I want to introduce the most common Active Directory PowerShell cmdlets to you like New-ADUser. With the cmdlet New-ADUser you can: – Create new users, – Add passwords or – Bulk create users with a csv-file
With Microsoft Azure you can set up virtual machines with a great range of operating systems quickly and easily. For the administration, Microsoft Azure offers a Web Management interface. But Azure PowerShell cmdlets are even more interesting for assembling individual script libraries. Use these scripts to install virtual machines comfortably.
I thought about how to automate AD sites with PowerShell – and found a solution. At the end of this article, I provide a complete script to create sites in Active Directory with a CSV-file. The article includes detailed explanation, screenshots and examples.
Many know that you can use .Net-classes in Powershell directly. These are then compiled into terms. But what many do not know is that it is also possible to use “pure” .Net code in Powershell. – It works like this:
A lot of log files need to be analyzed during an Active Directory migration. In case there is a log, you mostly have to write an email, update a database or do something like that. This is a simple example of a PowerShell log file monitoring script for a share:
Some PowerShell scripts have to build a temporary drive connection. For example to get a file from a share. I like to use the “New-PSDrive” commandlet for that. Unfortunately, this commandlet had a bug under Powershell 2.0. There are, however, alternative solutions.
During an Active Directory migration, all clients – as far as they won’t be reinstalled – have to be transferred into the target domain. For this process, Quest Migration Manager for AD offers the tool “Resource Updating Manager (RUM)”.
I was looking for a possibility of a fast LDAP search with PowerShell for a daily report. I wanted to create the following report automatically: How many users have been migrated until now? (all users with a certain property) I experimented with three possibilities and came up with the following:
You can automate recurrings tasks with interactive PowerShell scripts. How to query input values? How to make PS scripts interactive? An introduction to Read-Host, Confirm, PromptForChoice and Prompt
You can edit Multi Value Attributes with the PowerShell. But if you use the usual techniques, existing content will be deleted. Some small changes in the script line are the solution.
- Nesting groups in Active Directory
- Create home directory and grant permissions with PowerShell
- Creating an individual random password with PowerShell
- Retrieve Active Directory subnets with PowerShell
- Editing users of other domains – with PowerShell
- Azure Basics: Connecting with Azure (PowerShell)
- PowerShell Custom Objects
- Logon Script does not start on Windows Server 2012 R2 domain
- IsMember – Check group membership in Active Directory
- Dynamic OU Groups – Assign Permissions to OUs