---
title: "Finding AD Users: Master Get-ADUser in PowerShell"
description: "Locate Active Directory users effortlessly. Learn to master the Get-ADUser cmdlet in PowerShell."
canonical: "https://adamtheautomator.com/docker-windows-server/"
---

# Finding AD Users: Master Get-ADUser in PowerShell

> Locate Active Directory users effortlessly. Learn to master the Get-ADUser cmdlet in PowerShell.

Source: https://adamtheautomator.com/docker-windows-server/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Finding AD Users: Master Get-ADUser in PowerShell](https://adamtheautomator.com/wp-content/uploads/2019/06/5d238ae5c824b514689ea591.jpg)

# Finding AD Users: Master Get-ADUser in PowerShell

[![](https://secure.gravatar.com/avatar/d0b9d42e21e5622713f8b693aa5c0f9244d5f7dd200ed29b8398f52dee5de337?s=192&d=mm&r=g)Adam Bertram](https://adamtheautomator.com/author/adam-bertram/)30 June 20192 min. read

Categories: [DevOps](/category/devops/)

Tags:[Docker](/tag/docker/)

Table of Contents

*   [Download and Install the Docker Module and Package](#h-download-and-install-the-docker-module-and-package)
*   [Downloading the Base Image](#h-downloading-the-base-image)
*   [Running Commands in the Docker Windows Server Container](#h-running-commands-in-the-docker-windows-server-container)

If you’re new to Docker and want to learn how to create your first Docker Windows Server container, you’re in luck. In this article, you’ll learn how to get started from scratch – no prior experience is necessary!

Not a reader? Watch this related video.

**_Not seeing the video? Make sure your ad blocker is disabled._**

Windows Server has come a long way since Windows NT. First, we could virtualize Windows Server, and now we can even play in the realm which what was once an exclusive Linux feature: containers!

Nowadays, we can run Windows on a container in Docker just as easily as a Linux-based container, but how? Since Microsoft is a fairly recent player in the container market, the concept of Docker and containers is probably new to a lot of Microsoft shops. The best way to learn about something is doing, so let’s do it.

For this article, we’re going to start from a Windows Server 2016 host since this is the earliest version of Windows in which you can run a true Docker host.

## Download and Install the Docker Module and Package

On your Windows Server 2016, head out to the PowerShell Gallery and download the [DockerMsftProvider](https://www.powershellgallery.com/packages/DockerMsftProvider/1.0.0.8) module. This is the [PowerShell module](https://adamtheautomator.com/powershell-modules/ "PowerShell module") that contains all of the package providers that will allow you to download and install the docker utilities via the PowerShellGet `Install-Package` command.

```powershell
PS> Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
PS> Install-Module -Name DockerMsftProvider -Force
```

Once you’ve got the provider installed, it’s now time to put it to good use by installing the Docker page from it.

```powershell
PS> Install-Package -Name docker -ProviderName DockerMsftProvider -Force

WARNING: A restart is required to enable the containers feature. Please restart your machine.
Name    Version        Source            Summary
----    -------        ------            -------
Docker	17.06.2-ee-6   DockerDefault    Contains Docker EE for use with Windows Server.
```

We will head the warning the package installer tells us and will then restart our Windows Server host with `Restart-Computer -Force`.

Once the server comes back online, check to see if the docker daemon is working correctly by checking the version. If you get back a client and a server section with version information for each, you’re good to go!

```bash
PS> docker version
Client:
Version: 17.06.2-ee-6
API version: 1.30
Go version: go1.8.3
Git commit: e75fdb8
Built: Mon Nov 27 22:46:09 2017
OS/Arch: windows/amd64

Server:
Version: 17.06.2-ee-6
API version: 1.30 (minimum version 1.24)
Go version: go1.8.3
Git commit: e75fdb8
Built: Mon Nov 27 22:55:16 2017
OS/Arch: windows/amd64
Experimental: false
```

## Downloading the Base Image

Next comes the part where you need a container base image. The easiest way to get an image onto your server is through the [Docker Hub](https://hub.docker.com/). To get an image from the Docker Hub, you can use the `pull` parameter on the docker utility.

**_Related: [How to Create a Docker Windows Image with Docker Build](https://adamtheautomator.com/docker-build-tag/)_**

For now, I’ll pull down a fresh copy of Windows Server Core. Once started, you will see the download progress for each image in the defined repository.

```bash
PS> docker pull microsoft/windowsservercore

Using default tag: latest
latest: Pulling from microsoft/windowsservercore
3889bb8d808b: Downloading [========================> ] 2.019GB/4.07GB
cfb27c9ba25f: Download complete
```

Once the image for Windows has been downloaded, the Docker engine will then extract each image from its compressed state. Unfortunately, for Windows Server images, this can take a bit of time. But once the image(s) have extracted, you’ve created your first Windows Server container with Docker!

## Running Commands in the Docker Windows Server Container

The final piece just to confirm the container is intact and working is to send a run command to it using `docker run`. `docker run` is a command that sends a non-interactive command to the container. It’s essentially like opening up `cmd` and running commands that way.

Any command will work so for how we’ll just see if we can return the hostname of the container using the `hostname` command.

```powershell
PS> docker run microsoft/windowsservercore
hostname69c7de26ea48
```

If it returns anything but an error you’re done! You’ve now got a Windows Server 2016 host setup with the Docker service running capable of pulling and pushing Docker images to/from the Docker Hub and running any number of containers you please.

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fdocker-windows-server%2F&text=Finding%20AD%20Users%3A%20Master%20Get-ADUser%20in%20PowerShell)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fdocker-windows-server%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fdocker-windows-server%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2026/02/featured_image-13.webp)

### [Azure Container Apps: Instant Preview Environments per PR](/build-ephemeral-preview-environments-every-pr/)

Build isolated preview environments for every pull request using Azure Container Apps revision labels and Azure DevOps pipelines with scale-to-zero economics.

![](https://adamtheautomator.com/wp-content/uploads/2025/11/55418e927e511ae263219c072e27d637c2a967a5036de7020b329582db775c26.png)

### [Automating Docker Container Health Checks with Python and Local Notifications](/docker-health-checks-python/)

Docker's built-in health checks are passive—they tell Docker when a container fails, but do they tell you? In this tutorial, we'll build a lightweight Python monitoring system that runs entirely on your infrastructure with zero external dependencies. You'll learn to detect container failures in real-time, send instant alerts, and maintain a complete audit log of every state change.

![](https://adamtheautomator.com/wp-content/uploads/2023/07/gitea-docker.jpg)

### [Gitea Docker: Your Ultimate Self-Hosted Git Solution](/gitea-docker/)

Learn how to install a Gitea Docker instance and self-host Git repositories securely in this ATA Learning tutorial!

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
