I'll be speaking this Saturday, October 27th at PowerShell Saturday 003 in Atlanta. My session is officially titled "PowerShell Fundamentals for Beginners". A guest blog that I wrote about PowerShell, my session, and the event was published yesterday on the Hey, Scripting Guy! Blog at Microsoft TechNet so take a look at it and the brief description of my session on the PowerShell Saturday 003 website for more details. It's getting close to Halloween so I picked up some special treats in the New Read more [...]
I'm a big fan of the online version of PowerShell help. I also use Google Chrome as my default web browser. Since I've moved to Windows 8 and PowerShell 3.0, using the Get-Help PowerShell cmdlet with the Online parameter generates an error. There's actually two different errors that I've seen a lot of, the first one is because the online help doesn't appear to exist and this error occurs regardless of what web browser you're using: Get-Help : The online version of this Help topic cannot be Read more [...]
You have a fresh installation of Windows Server 2012 that was installed using the default installation type of server core installation (no-GUI). This server will be the first domain controller in a brand new Active Directory forest. Log into the server and launch PowerShell by typing "powershell.exe". You'll need to first add the AD-Domain-Services role to the server:
The installation of this role completes and a restart is not required: Now to make Read more [...]
Use PowerShell to obtain a list of currently running processes where the executable file has been modified in the past 90 days. The number of days is a parameterized value so it can be specified when running the script without having to manually modify the script each time you want to change the value. The script uses a foreach loop to iterate through each individual process that is returned by the Get-Process cmdlet. The process's path property must contain a value or it will not be listed. Each Read more [...]
I posted a blog yesterday about a PowerShell issue I was experiencing and the problem ended up being due to the new PowerShell version 3 Where-Object Syntax producing different results than the PowerShell version 2 Where-Object syntax. Piping Get-Volume to Where-Object and filtering on the drive letter using the version 3 syntax appears to be case sensitive. It doesn't return results when using a lower case 'c':
Using the PowerShell version 2 syntax with Read more [...]
Get-Volume | where DriveLetter -eq 'C'
Get-Volume | where DriveLetter -eq 'c'
While doing some testing on my Windows 8 machine today, I discovered an issue where Filtering Left could produce different results than filtering with the Where-Object cmdlet. Nothing special here. Just using the Get-Volume cmldet and filtering left with its DriveLetter parameter. Using either an upper or lowercase 'C' returns the same results:
Using the Where-Object cmdlet to do the filtering, while not a best practice when the filtering can be accomplished Read more [...]
Get-Volume -DriveLetter 'C'
Get-Volume -DriveLetter 'c'
You have an Active Directory user account and you want to make a second user a member of the same groups without removing the second user from any groups they may already be a member of. I prefer using the Quest PowerShell Cmdlets for Active Directory for doing my AD administration work. They have been downloaded and installed on the system this is being run from. The Quest snap-in has been added to make the cmdlets available. User 'afuller' is a member of several groups in this active directory Read more [...]
You have a customer who has an EqualLogic PS Series Storage Area Network (SAN) where the Snapshot Reserve for many of their SAN volumes is currently set to more than 100% of the actual volume size. The SAN also has several volumes where the snapshot reserve is set to exactly 100%, other volumes where the snapshot reserve is set to less than 100%, and others that don't have or need snapshots configured at all. This customer has recently implemented a new backup solution that uses point in time Read more [...]
This blog post applies to only Windows 8 and Windows Server 2012. Want to know how much time there is until your current DHCP leases expire?
I have 23 hours, 47 minutes, and 46 seconds until my current DHCP lease expires on one of my network interfaces and 22 seconds more than that left on the other one. Want to know the exact date and time of when they expire?
Get-NetIPAddress -PrefixOrigin Dhcp |
select InterfaceAlias , IPAddress, ValidLifetime
I haven't added any error handling to these scripts so if Read more [...]
Get-NetIPAddress -PrefixOrigin Dhcp |
select InterfaceAlias, IPAddress,
This past weekend, I attended PowerShell Saturday 002 in Charlotte, NC. One of the sessions I attended was "Discovering the Power of WMI & PowerShell in the Enterprise" by Brian Wilhite. One of the cool things that Brian covered in his session was how to use the new PowerShell version 3 Get-CimInstance cmdlet to target down level clients that don't have PowerShell installed or don't have PowerShell remoting enabled. There's no parameter to change the protocol on the actual Get-CimInstance Read more [...]
It's fairly common to see the identity for an IIS application pool changed to a domain user account. The following image shows three application pools, the DefaultAppPool has the default settings, the www app pool has a Managed Service Account specified, and the wwwDev app pool has a standard domain user account specified: When a standard user account is specified, the password is entered as shown below: I've used what you would think is a super secure password, generated by KeePass: When Read more [...]
If you haven't heard, there's a PowerShell Saturday technology event this weekend in Charlotte, NC (Saturday, September 15, 2012). It's going to be awesome based on the list of sessions and speakers they have lined up which rivals conferences that cost hundreds or possibly even thousands of dollars to attend. It's also similar to the SQL and SharePoint Saturday technology events that I've attended for the past few years so I can speak from experience, they're definitely worth the time and effort Read more [...]
This month makes 3 years that this blog site (mikefrobbins.com) has been live. I'll reach a quarter of a million hits on this blog site before the end of the day today! You'll notice that PowerShell has become more and more the focus of what I'm blogging about. See how much larger the word "PowerShell" is than everything else in the category cloud on the right side of this site. Why? Because it's the future of system administration. If you're only interested in the PowerShell category of this Read more [...]
The hardware requirements for using Hyper-V to run virtual machines on a Windows 8 client states that a 64-bit system that has a processor (CPU) that supports Second Level Address Translation (SLAT) is required. A minimum of 4GB of RAM is also required. How do I know if my Processor (CPU) supports Second Level Address Translation? You could do like most blogs on the Internet state and use Coreinfo: You have two additional choices if you already have Windows 8 or Windows Server 2012 Installed. #1 Read more [...]
Many PowerShell cmdlet parameters have aliases such as "Cn" for ComputerName. These aliases aren't well documented and even viewing the full help for a cmdlet doesn't show them. The following command can be used to display a list of all the parameters for a particular PowerShell cmdlet and any aliases that exist for those parameters:
One thing to keep in mind is this is a list of all the parameters from all parameter sets which means some of them are mutually Read more [...]
(Get-Command (Read-Host "Enter a PowerShell Cmdlet Name")).parameters.values |
select name, aliases
This is definitely unsupported so be sure to read the disclaimer on the right side of this blog before continuing. Read this blog article completely before attempting this process. You've just reloaded your work computer with Windows 8 RTM that you downloaded from MSDN or TechNet and you need to install the Exchange Server 2010 Management Tools so you can manage your Exchange server without having to log into it whether it be with the GUI or with PowerShell. In this example, I run setup.exe Read more [...]