May 20th, 2016 by Charlie Russel and tagged $Profile, PowerShell
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
April 13th, 2013 by Charlie Russel
As usual, a minor glitch in my workflow has me mucking around with my $profile. It all started because I normally run Word, Excel, and other Office applications from the command line (as I do many non-MS applications.) To do this, I have functions and aliases in my $profile. These let me start Word, for […]
Posted in PowerShell | Comments Off on More $profile madness
February 5th, 2011 by charlie
A copy of the profile described here is at: Charlie_Profile Probably one of the first scripts any new Windows PowerShell user writes is a custom profile. Your PowerShell profile ($profile in PowerShell speak), is run every time you open a PowerShell window, and it allows you to do a lot of different things to set […]
Posted in PowerShell | Comments Off on Customizing PowerShell–Using $Profile
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 »
February 14th, 2017 by Charlie Russel and tagged PowerShell v5.1, Server core, Windows Server 2016
I know I owe you more on creating a lab with PowerShell, and I’ll get to that in a few days. But having just set up a new domain controller running Server 2016 Core, I thought I’d include a couple of tricks I worked through to make your life a little easier if you choose […]
Posted in $Profile, Console, Hyper-V, PowerShell, Windows Server Core | 5 Comments »
October 4th, 2016 by Charlie Russel and tagged Get-Credential, PowerShell, PSCredential, SecureString
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
August 20th, 2015 by Charlie Russel and tagged $Profile
The path on many modern computers gets to be so long that reading it is a nuisance. Worse, from within Windows PowerShell, there isn’t a built in equivalent to the old cmd “path” command. Yet all the information we need is there, it’s just not where we might expect it. The actual executable path for a […]
Posted in PowerShell | Comments Off on A More Readable Path
January 3rd, 2012 by Charlie Russel and tagged $Profile, Map Drives, PowerShell
My standard environment expects to have several drive mappings wherever I’m logged in to my network. Even when I’m running on a computer that isn’t joined to the domain. To facilitate that, I have a simple “mapdrives.cmd” file that has the necessary net use commands in it to map them. Then my default PowerShell $profile […]
Posted in PowerShell | Comments Off on Mapping Drives
March 23rd, 2011 by Charlie Russel and tagged PowerShell
If any of you have ever created a file in the PowerShell ISE and then wondered why it doesn’t look right when you open it in some other editor, or try to run it, you’ve just run into a "feature" that I wish were not the default–New files are saved as Unicode files. There’s no […]
Posted in PowerShell | Comments Off on PowerShell ISE and ASCII Files