Skip to main content

Posts

Showing posts from March, 2015

Active Directory Module Cmdlets will not Work

On PowerShell.com today, I noticed an IT pro that was not able to get the Get-ADGroupMember cmdlet to work, but was able to utilized an [ADSI] query.  He recently acquired his first Windows Server 2008 R2 Domain Controllers.  My first thoughts went to the Active Directory Web Services. This is service is what the Active Directory Module for PowerShell uses and must be running on at least one of your Domain Controllers.  When I shut down this service and then attempted to access a groups membership, I received the following: PS C:\> Get-ADGroupMember -Identity "Domain Admins"   Get-ADGroupMember : Unable to find a default server with Active Directory Web Services running. At line:1 char:1 + Get-ADGroupMember -Identity "Domain Admins" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo           : ResourceUnavailable: (Domain Admins:ADGroup) [Get-ADGroupMember], ADServerDownException     + FullyQualifiedErrorId : ActiveDirectoryServer:1355,Mic

Playing with the ISE Profile

Since PowerShell 3 and 4, I’ve been teaching more of my PowerShell classes using the ISE rather than using the shell.  This is because the Intellisense really helps my students learn PowerShell.  One thing that I did not like about the ISE is that the cmdlet Start-Transcript could not be used in the ISE.  Now with PowerShell V5, you can.  For those who have taken my PowerShell classes know that I have transcripts starting automatically in my Shell profile.  Well, time to do the same thing in the ISE.  My goal is to provide my students with a transcript of my activates from the ISE for their review after class.  First off, I need to create a profile for the ISE. I can do this by Simply creating the correct profile file in my WindowPowerShell directory in my profile. 1 2 if ( ! ( test-path $profile )) { new-item -type file -path $profile -force }   Here is the result:       Directory: C:\Users\JASON\Documents\WindowsPowerShell     Mode                 LastWriteT

Start-DscConfiguration : The directory name is invalid.

I’ve been teaching PowerShell since version 1.  On occasion, I have to follow my own advice.  Here is the nifty little error that I received while playing around with DSC. Start-DscConfiguration : The directory name is invalid. At line:1 char:1 + Start-DscConfiguration -Wait -Path C:\MyFaxConfig\LON-SVR1.mof -Verbo ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo           : NotSpecified: (:) [Start-DscConfiguration], IOException     + FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.DesiredStateConfiguration.Commands.StartDscConfigurationCommand Well, this is a pleasant one. Actually it is very simple.  Here is what I typed: Start-DscConfiguration -Wait -Path C:\MyFaxConfig\LON-SVR1.mof -Verbose Anybody???  After a lot of internet searches that came up with nothing, I turned to the help files.  Here is the example from the help file for Start-DscConfiguration : Start-DscConfiguration -Path "C:\DSC\Configura

The PowerShell proivder MSFT_RoleResource does not contain the corresponding MOF file

Doing some work on getting a very basic DSC example ready for my PowerShell class this week.  Funny thing is, I did this entire demonstration on a flight last week and was just trying to polish it up.  While doing it again, this bug pops out of no where.  I found out on PowerShell.org a post by Dave Wyatt with a response by Don Jones to in install KB2883200.  Since I was testing in isolated VMs, I just downloaded the MSU from Microsoft and pasted it onto the Source VMs desktop and installed it.  Well, that one was already installed.  But it was not installed on the target server.  After installing it on both servers in this test, still no go.  I then installed KB3037315 and then KB2894179.  That did the trick!!!  KB3037315 I understand.  It contains an update to DSC.  KB2894179 however is concerned with the OOBE Wizard in Windows 8.1.  No idea why that third update worked, but I wanted to put it out on the net in case someone bumps into this.  My test VMs are not completely up to da

The Annoying Subnetting Question–Think Big Bang Theory

Yesterday on Day 1 of a 20411 Administering Windows Server 2012 class we had a question pop up on the DNS chapter.  Right off the bat I knew this question came for a brain dump web site.  Let’s just get my position out in public right off the bat.  I expect those who are going to take the exam to take the time to learn the technology.  If you do use a practice exam to prep, use it as a learning tool.  Do not just memorize the exam.  It will not do you or anybody else any good.  From the perspective of others in the class, it was like watching the Big Bang Theory unfold in front of them.  We dove into this problem to try and find the correct answer the proper way using research. Let’s first take a look at the question and then we will learn from it by finding the answers to all of the questions that do not have the answers for. You work as an Administrator at iCompany.com. The iComapny.com network consists of a single domain named iComapny.com. All servers in the iComapny.com domain ha