Posts tagged with PowerShell

PowerShell: Remove-ADComputer v. Remove-ADObject

April 27th, 2018 by and tagged , , , , ,

So, as I mentioned the other day, we needed to do some major cleanup of defunct and orphaned computer accounts. Most computers that hadn’t been logged in to in the last year needed to go. And there were a LOT of them! Certainly more than anyone wanted to try to do in the GUI. So, […]

Posted in Active Directory, IT Admin, PowerShell | 4 Comments »

PowerShell: Finding Orphaned Computer Accounts in AD

April 23rd, 2018 by and tagged , ,

The other day we decided it was time and more to do some cleanup of orphaned computer accounts in our AD. We are about to do some AD restructuring, and figured it was a good opportunity to clean up and remove old computer accounts for machines that no longer existed. Now there are probably lots […]

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

Creating VPNs

March 29th, 2018 by and tagged , ,

First, an apology. I usually try to be conscientious about adding new nuggets of PowerShell fun on a regular basis, but this winter, LIFE has intruded, and it simply hasn’t happened. I won’t promise it won’t happen again, but I will try to do better. Today’s post looks at a problem we’ve been dealing with […]

Posted in Annoyances, IT Admin, Network Administration, Networking, PowerShell | No Comments »

Using Invoke-WebRequest to Read a File

August 30th, 2017 by and tagged , ,

An interesting problem came up recently where we needed to standardize the creation of VPNs on new user laptops. To do that, I knew I needed to use the Add-VPNConnection cmdlet (more on that in a another post, soon.) But in order to populate the parameters of Add-VPNConnection, I needed to store the values somewhere. […]

Posted in IT Admin, Networking, PowerShell | No Comments »

Add a Domain User to the Local Administrators Group

June 21st, 2017 by and tagged , ,

When building out a workstation for an AD Domain user, in some environments the user is added to the local Administrators group to allow the user to install and configure applications. Now there are some of us who think that’s a Bad Idea and a Security Risk, but the reality is that it’s policy in […]

Posted in Active Directory, IT Admin, PowerShell | No Comments »

Copying AD User Group Permissions with PowerShell

June 6th, 2017 by and tagged , , ,

One of the tasks that I’m often asked to perform as an Active Directory domain administrator is to assign a user the same set of permissions as an existing user. This is something you can do fairly easily in the GUI (Active Directory Users and Computers, dsa.msc) when you’re first creating the user, but which […]

Posted in Active Directory, IT Admin, PowerShell, Security | No Comments »

Guest Post — Get-myFreeSpace Revisited

May 4th, 2017 by and tagged , , , , , , , , , ,

Today’s post comes by way of a co-worker, Robert Carlson, who took my previous post on getting the free disk space of remote computersĀ and offered a very useful suggestion — instead of outputting strings, which is only useful for a display or report, he suggests creating a PSCustomObject and outputting that. Slick! I like it. […]

Posted in IT Admin, PowerShell, PowerShell Functions | No Comments »

Resizing the PowerShell Console

April 28th, 2017 by and tagged , , , , ,

Windows 10’s support for high DPI displays is much better than previous iterations of Windows, but there are still some times it gets a bit confused. One such problem occurs when you have multiple high DPI displays or two displays of different sizes. If you move PowerShell console windows between displays or log back in […]

Posted in $Profile, Annoyances, Console, PowerShell | 5 Comments »

Getting the Free Disk Space of Remote Computers Revisited

April 18th, 2017 by and tagged , , , , , , , , ,

Several years ago, I wrote a fairly simplistic script to get the free disk space of remote computers. It wasn’t all that sophisticated, but it got the job thatĀ I needed done, so I shared it here on my blog, since I thought others might find it useful. Which, based on the number of hits here, […]

Posted in Annoyances, Network Administration, PowerShell, Windows Server, WMI | 4 Comments »

How to tell if you’re running on Windows Server Core

March 16th, 2017 by and tagged , ,

I have a bunch of scripts I use when I’m building a lab to install “stuff” (that’s the Technical Term we IT Professionals use) that I need to manage and work with a virtual machine. Now, when I build from a SysPrep’d image, that’s not an issue, but if I have to build from an […]

Posted in Application Compatibility, PowerShell, Registry, Windows Server Core | No Comments »

« Previous Entries