Tag: PowerShell

How to Install the Exchange 2010 Management Tools on Windows 8 RTM

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 [...]

Error 0x800F0906 When Trying To Add .NET Framework 3.5 to Windows 8 RTM

The Windows 8 RTM was released yesterday to TechNet subscribers and this morning I decided to start the day off by reloading my business computer. I've been running the Release Preview on a netbook and on some VM's without issue. Everything seemed to go well until I tried to load several applications that required the .NET Framework 3.5. Each of them failed to install stating they were unable to add the .NET framework so I decided to install it manually. Here's the process I used to try to install Read more [...]

Working with WMI Just Got a Lot Easier Thanks to PowerShell Version 3

Working with WMI just got a lot easier thanks to the new tabbed expansion feature of the Get-CimInstance cmdlet in PowerShell version 3 that makes discovering namespaces and classes a much simpler process. A static blog wouldn’t do this feature justice so I decided to record a video for this one:


Let me know what you think and if you would like to see more of these types of videos.

µ

Use Data Stored in a SQL Server Database to Create Active Directory User Accounts with PowerShell

I need a few Active Directory users created in my mikefrobbins.com test environment so I thought why come up with fake information when I could use information that I already have in a SQL Server database? The Employees table in the Northwind database looks like an easy enough candidate since all the data I need is in one table. This is about the concept and not about seeing how complicated I can make this process. Here's the type of information I'll pull out of this database to use for the Active Read more [...]

Can the PowerShell ISE be Installed on Windows Server 2012 Server Core Installation?

I noticed a few days ago that the PowerShell ISE is an available feature on Windows Server 2012 Release Candidate when running the Server Core Installation (no GUI): Does that mean the PowerShell ISE can run on Server Core in Windows Server 2012 unlike in Windows Server 2008 R2? Let's find out. The installation takes a long time and then you're prompted to restart when it's complete: Finally when the restart is finished and you log in, Server Manager will be loaded and you'll discover that Read more [...]

Querying a SQL Server Database from PowerShell

A few days ago, I wrote a PowerShell script on my computer that would ultimately be used on a different computer to automate a specific task. One of the things this script did was to query a SQL Server database which worked fine on my computer. After moving the script, it didn't take long to figure out that the other computer didn't have the necessary SQL PowerShell snap-in or module. My goal was to install the minimum features of SQL Server 2008 R2 to be able to run Transact SQL from PowerShell Read more [...]

No Soup, I Mean No PowerShell -Version 2 For You Windows 8 and Windows Server 2012

Be sure to start off by reading my previous blog article titled "Error When Running PowerShell -Version 2 on Windows 8 and Windows Server 2012" if you have not previously read it since attempting to run PowerShell in version 2 mode generates an error on a default installation of Windows 8 or Windows Server 2012. In PowerShell version 3, you can access PowerShell version 2 by running "PowerShell.exe -Version 2" (or "powershell -v 2"): Windows 8 Release Preview The PowerShell version 2 Read more [...]

Error When Running PowerShell -Version 2 on Windows 8 and Windows Server 2012

Windows 8 Release Preview On a fresh installation of the Windows 8 Release Preview, when attempting to run PowerShell.exe -Version 2, you'll receive the following error: "Version v2.0.50727 of the .NET Framework is not installed and it is required to run version 2 of Windows PowerShell." The following error message is generated if you attempt to run the same command from the PowerShell ISE: "powershell : V e r s i o n v 2 . 0 . 5 0 7 2 7 o f t h e . N E T F r a m e w o r k i s Read more [...]

Collections Are More Transparent In PowerShell v3

In PowerShell version 2, it took me a while to figure out why using the dotted notation method of selecting a property worked at times and not at others. In the following example $v2 is a variable so I'm able to select the CPU property by using $v2.cpu or accomplish the same thing by piping $v2 to Select-Object with the -ExpandProperty parameter and specifying the CPU property: In the scenario shown in the following image, why didn't $v2.cpu return anything? Because it's a collection. In this Read more [...]

Use PowerShell to List Stopped Services that are Set to Start Automatically While Excluding Delayed Start Services

Have you ever had 67 emails about services on your servers being up and down from your monitoring solution? It's not a good feeling and those emails are only about the ones that monitoring is setup for. What other services could be stopped that aren't being monitored? Wouldn't you like a quick and easy way to check whether or not all of the services that are set to start automatically are actually running? My first thought: Use the Get-Service cmdlet. Unfortunately it doesn't have a parameter Read more [...]

Can iSCSI Targets be Renamed on an EqualLogic PS Series Storage Area Network?

I received a tweet from someone a few days ago asking if it was possible to rename an iSCSI target on an EqualLogic PS Series Storage Area Network (SAN). I wasn't sure, but it was interesting enough to research and determine if it was possible or not. Based on a screenshot provided by this person, they wanted to change the default iSCSI target name prefix so new volumes that are created have a different target prefix. It's possible to change this setting using PowerShell, but not the GUI: Even Read more [...]

Want VM Reliability and Uptime? Hyper-V on Server Core

While at TechEd last month I heard two things that I've been preaching for a while. Server Core installation (no-GUI) is the recommended installation type beginning with Windows Server 2012. I've been saying this for a while when it comes to Windows Server 2008 R2. Server Core: Reliability and Uptime In each of three datacenters that I support there are multiple Hyper-V servers that run Windows Server 2008 R2 w/SP1 with the Core Installation (Server Core). These production servers have unbelievable Read more [...]

Use PowerShell to Determine What Roles are Added When Turning a Windows 2012 Server into a Domain Controller

Goal: Determine what roles are installed when turning a Windows Server 2012 machine into a domain controller. I started out by using PowerShell to save a list of what roles are installed on a plain vanilla 2012 server that has the full GUI installation. The following one liner would be used in PowerShell version 2 to accomplish this task and the syntax is compatible with version 3: PowerShell version 3 has simplified syntax when using the Where-Object cmdlet Read more [...]