April 27th, 2018 by Charlie Russel and tagged Date Math, Get-ADComputer, Get-Date, PowerShell, Remove-ADComputer, Remove-ADObject
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 »
April 23rd, 2018 by Charlie Russel and tagged Get-ADComputer, Get-Date, PowerShell
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 | Comments Off on PowerShell: Finding Orphaned Computer Accounts in AD
March 29th, 2018 by Charlie Russel and tagged Add-VPNConnection, PowerShell, VPN
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 | Comments Off on Creating VPNs
August 30th, 2017 by Charlie Russel and tagged ConvertFrom-CSV, Invoke-WebRequest, PowerShell
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 | Comments Off on Using Invoke-WebRequest to Read a File
June 21st, 2017 by Charlie Russel and tagged ADSI, Local Administrator, PowerShell
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 | Comments Off on Add a Domain User to the Local Administrators Group
June 6th, 2017 by Charlie Russel and tagged Active Directory, AD DS, Copy AD User, PowerShell
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 | Comments Off on Copying AD User Group Permissions with PowerShell
May 4th, 2017 by Charlie Russel and tagged Calculated Column, Comment-Based Help, Disk Free Space, ErrorAction, Format-Table, Formatting output, Pipeline, PowerShell, PowerShell Function, Process{}, WMI
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 | Comments Off on Guest Post — Get-myFreeSpace Revisited
April 28th, 2017 by Charlie Russel and tagged Buffer Size, Console, Display, HighDPI, PowerShell, Window Size
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 »
April 18th, 2017 by Charlie Russel and tagged Calculated Column, Comment-Based Help, Disk Free Space, ErrorAction, Format-Table, Formatting output, Pipeline, PowerShell, Process{}, WMI
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 »
March 16th, 2017 by Charlie Russel and tagged PowerShell, Server core, Windows Server Core
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 | Comments Off on How to tell if you’re running on Windows Server Core