Posts tagged with PowerShell

Importing users into Active Directory

October 27th, 2016 by and tagged , , , ,

When you need to create a single user in Active Directory Domain Services (AD DS), the tendency is to just “do it” in the GUI – either Active Directory Users and Computers (ADUC) or Active Directory Administrative Center (ADAC). But if you’ve got 25 users to add, or even 5 users to add, that’s just […]

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

PowerShell: Get-Credential from a file

October 4th, 2016 by and tagged , , ,

If you routinely have to log into a separate domain, it can be a nuisance to always have to run Get-Credential. Plus writing scripts with a -Credential parameter is a nuisance because if you call Get-Credential in the script, it will always prompt you.   I run a separate lab network here, with an Active […]

Posted in Annoyances, Network Administration, PowerShell, PSCredential | Comments Off on PowerShell: Get-Credential from a file

Getting Automatic Services That Are Stopped With PowerShell

September 29th, 2016 by and tagged , ,

One of the first things I check when I am troubleshooting a system is whether all the services that should be running, are. I could just open up services.msc, click on the “Startup Type” column to sort by the startup type, and scroll down through the Automatic services to see which ones aren’t running. But […]

Posted in Network Administration, PowerShell, WMI | 2 Comments »

Active Directory — Unlocking a User Account with PowerShell

September 9th, 2016 by and tagged , , , , , ,

As any SysAdmin knows, users periodically lock themselves out of their accounts, usually because they forgot a password or somehow mistyped it too many times. And after all, if it failed once, why not keep trying it? Unlocking that account is NOT something you do with Set-ADUser, unfortunately, because the PowerShell ActiveDirectory module has a […]

Posted in Active Directory, PowerShell, PSCredential | Comments Off on Active Directory — Unlocking a User Account with PowerShell

Testing for Location on a Laptop

September 4th, 2016 by and tagged , ,

On my laptops, I have a different set of drive maps when I’m at home, or on the road. At home, I map to various local domain resources, but when I’m on the road, those resources aren’t available and I need to create “local” maps to versions that I can sync up to those domain […]

Posted in $Profile, PowerShell, Survival Guide | Comments Off on Testing for Location on a Laptop

Shutting Down Running VMs – Revisited

June 4th, 2016 by and tagged , ,

A couple of years ago, I posted a perfectly good snippet for shutting down the running VMs on a machine. But the code there is very much the “old syntax” and not terribly elegant.  For shutting down all the running RODCs, I used: Get-VM -Name *rodc* | Where-Object {$_.State -eq “Running” } | Foreach-Object { […]

Posted in Hyper-V, PowerShell | Comments Off on Shutting Down Running VMs – Revisited

More $Profile Tricks — Automatically Opening an Admin Window

May 20th, 2016 by and tagged ,

I run as a limited user during my normal work, but I always keep one or more Admin windows open. These are logged in to my Domain Administrator account, running “As Administrator”. And I make sure I can tell that I’m running in that window by setting the colour scheme with a nice, dark red, background. Hard […]

Posted in Network Administration, PowerShell | Comments Off on More $Profile Tricks — Automatically Opening an Admin Window

Clearing the Archive Attribute Bit

May 16th, 2016 by and tagged

I use a whole set of PowerShell scripts to create my lab environment when I’m working on a book or article. The master scripts all reside in a Build directory on my labhost. The problem is that when something goes wonky, or I need to tweak a script to do something a bit different, I’m […]

Posted in Annoyances, PowerShell | 2 Comments »

Starting Windows PowerShell Automatically

May 15th, 2016 by and tagged ,

Most system administrators routinely start a command line window of some sort when they log onto a computer. For me, obviously, that’s a PowerShell window. Actually, two PowerShell windows – one as a limited user, the other as an administrator, but that trick is for a different blog post. For this one, I’ll show you […]

Posted in Annoyances, Network Administration, PowerShell | Comments Off on Starting Windows PowerShell Automatically

Promoting a new domain controller

May 14th, 2016 by and tagged , , , ,

I’ve been working with Windows Server 2016 CTP5 recently, and because I installed it without the Desktop Experience (what we used to call a Server Core installation), I’m having to do everything in Windows PowerShell. No complaints, I enjoy it, but it does force me to think about things a bit sometimes. One of the […]

Posted in Active Directory, Network Administration, PowerShell, Windows Server, Windows Server Core | Comments Off on Promoting a new domain controller

« Previous Entries Next Entries »