Posts tagged with PowerShell

PowerShell: Rename an Active Directory User

March 11th, 2017 by and tagged , , ,

This came up at work the other day. Another admin had attempted to rename an AD User account and it had only partially gotten renamed — the SAM Account, Name and Display name were all correct, but the old user name was still showing up in a couple of places, including the login screen. The […]

Posted in Active Directory, PowerShell | 2 Comments »

Building a Lab in Hyper-V with PowerShell, Part 4

March 9th, 2017 by and tagged , , ,

Creating a new forest In the previous sections of this series, I’ve covered how to build VMs using PowerShell, but labs aren’t much good if they don’t actually have any structure. So, let’s create a new forest and domain to manage our labs. I’m going to assume for this post that you’ve gotten started already […]

Posted in Active Directory, Building Labs, DHCP, Networking, PowerShell, Windows Server Core | No Comments »

Nested Hyper-V Networking

February 19th, 2017 by and tagged , , , , ,

As I was trying to configure a new lab setup that takes advantage of nested Hyper-V so that I can build a lab to do Hyper-V host clustering, I ran into a problem with networking. Everything looked good on the “host1” virtual machine, but the domain controller I created for TreyResearch.net that runs as a […]

Posted in Building Labs, Hyper-V, Networking, PowerShell, Windows 10, Windows Server 2016 | No Comments »

Configuring Windows Server 2016 core as a DHCP Server with PowerShell

February 15th, 2017 by and tagged , , , , ,

As I mentioned last time, I’m setting up a new domain controller and DHCP server for my internal domain on Windows Server 2016 Core, and I’m exclusively using PowerShell to do it. For both the DHCP Server and AD DS roles, we need to configure a fixed IP address on the server, so let’s do […]

Posted in Active Directory, DHCP, Hyper-V, Networking, PowerShell, Windows Server 2016, Windows Server Core | No Comments »

Building a Lab in Hyper-V with PowerShell, Part 1

January 29th, 2017 by and tagged , ,

Setting the MAC Address Range on a Hyper-V Host   Today I want to start a new series of posts on building a lab environment in Hyper-V, primarily using Windows PowerShell to do initial configuration. For some things, you’ll need to use a non-PowerShell tool, such as SysPrep or even the Hyper-V Manager. But the […]

Posted in Building Labs, Hyper-V, PowerShell | No Comments »

PowerShell: Sending password expiration notices via GMail – Part 3

December 20th, 2016 by and tagged , , , , , ,

In Part 1 of this series, I showed you how to identify users whose password was about to expire. Then in Part 2 of the series, I took that list of users and sent email to them using gmail-hosted company email. This third part of the series pulls all that together into a single script, […]

Posted in Active Directory, Network Administration, PowerShell, PSCredential, Security | No Comments »

PowerShell: Sending password expiration notices via GMail – Part 1

December 13th, 2016 by and tagged , , , ,

In a perfect world, users would never forget their password, and never forget to change it before the expiration date. But we don’t live in that perfect world. I covered how to unlock AD accounts earlier in this post, but now I’d like to talk about how to first find the users whose accounts are […]

Posted in Active Directory, Network Administration, PowerShell | No Comments »

Getting Large Files

December 2nd, 2016 by and tagged , , , , ,

Sooner or later, you’re likely to have to “clean up” a disk that’s running out of space. One of the simplest ways to do that is to find the really large files on the disk or in a directory and delete ones that you don’t actually need, or move them to a location that has […]

Posted in Network Administration, PowerShell | No Comments »

Defaulting to PowerShell instead of CMD

November 18th, 2016 by and tagged , , , ,

Beginning in Windows 8.1, you could set the Windows PowerUser menu (right-click on the Start button, or Win-X key) to show Windows PowerShell and Windows PowerShell (Admin) on the menu instead of Command Prompt and Command Prompt (Admin). But every single new machine you log on to, you had to change that. A nuisance, at […]

Posted in Group Policy, PowerShell, Registry, Windows 10, Windows Server 2016 | Comments Off on Defaulting to PowerShell instead of CMD

Using a list as a default parameter value

November 13th, 2016 by and tagged , , , ,

I got an interesting question in a comment today on my old post on Getting the Free Disk Space of Remote Computers. While I answered the comment in the original post, it brought up something that’s not well understood, so I thought I’d take a moment to give a fuller answer here, where it will be […]

Posted in PowerShell | Comments Off on Using a list as a default parameter value

« Previous Entries Next Entries »