Tuesday, October 16, 2018

New-PSDrive - PowerShell Cmdlet of the Week

To launch this series of exploring a PowerShell cmdlet each week, I'd like to start off with one I discovered last week.

New-PSDrive

I had need of this particular cmdlet as I was setting up a Hyper-V Server 2019 host and I needed to get the ISO images from a file share located on a remote file server called FILE01. Normally I would use the "Map Network Drive" utility built into File Explorer, but as there isn't a GUI to use, I needed a different solution. While I could have fallen back on the classic net use command, I thought it might be nice to figure out how to use PowerShell to accomplish this task.

As it turns out, it is really easy to connect to a remote file share. You simply enter:

New-PSDrive -Name Z -Root "\\file01\LabShare" -PSProvider Filesystem

To break down this list of Parameters:
-Name Z  -  Assigns the drive letter "Z"
-Root "\\file01\LabShare" - Specifies the remote server and share name
-PSProvider Filesystem  -  Tells the cmdlet that we want to use the filesystem provider

-Persist  -  Optionally, you can use this parameter to reconnect to the share at the next login

To confirm that we were successful, simply run Get-PSDrive













As you can see, we have successfully connected to our file share.

That's all there is to it!


Wednesday, February 14, 2018

Configuring and Managing GlobalNames Zones

This post is going to cover some introductory information on creating GlobalNames zones for Windows Server 2012/2012 R2, and will cover much of the Microsoft 70-412 exam objective 4.6.2 "Configure a GlobalNames zone". The information I am sharing here is based on my study notes for the 70-412 exam. While GlobalNames zones are also available on Windows Server 2016, this article focuses specifically on Windows Server 2012 R2 and the Microsoft 70-412 exam objective.

The GlobalNames zone is a special DNS zone that allows for single-label name resolution, versus a FQDN (Fully Qualified Domain Name) lookup. It is utilized by clients if name resolution fails to yield results using either the Primary or Secondary DNS search suffixes, and is intended as a replacement for WINS. While GlobalNames covers some of the functions provided by WINS, it also adds a few new capabilities. GlobalNames provides this service via DNS by utilizing single-label CNAME records that are aliases for existing host records located in other DNS zones.

There are a couple of things to notes about how a DNS server interacts with the GlobalNames zone, and how it changes the behavior slightly. First, an authoritative DNS server handles searches in the following order until name resolution is achieved: Local zone data, GlobalNames zone, then, if it is unsuccessful, it hands the query off to a WINS server (if available). Second, when a DNS server is processing Dynamic DNS updates, it first checks the GlobalNames zone to ensure that the new entry is unique prior to adding them to a locally hosted zone.

While it may not be a commonly deployed solution, here are a few specific use cases where you might consider using GlobalNames:
  • You need to be able to provide single-label name resolution to IPv6 host. WINS does not support using IPv6 addresses.
  • You have only a small number of hosts that need single-label name resolution.
  • You are looking to retire WINS and move to a DNS only name resolution model, but you still have a requirement for single-label names for some legacy applications

It is also important to be aware of these gotchas:
  • The GlobalNames zone does not populate automatically. Each entry must be added manually.
  • It is not intended to support peer-to-peer networks for workstation name resolution
  • It does not support Dynamic DNS updates, so any changes must be edited manually
  • While it is possible to configure GlobalNames to work between Active Directory forests, it requires some additional steps that are beyond the scope of this article.

While there aren't many requirements for a using a GlobalNames zone, there are a couple. First, you must be running Windows Server 2012/2012 R2. Second, all other DNS servers must be running Windows Server 2008 or higher.

To configure a GlobalNames zone, follow these 3 simple steps:
  1. Create a new AD Integrated zone called ‘GlobalNames’ and set it to replicate to the entire forest
  2. Activate the GlobalNames zone on each DNS server in the forest by running this PowerShell cmdlet: Set-DnsServerGlobalNamesZone –ComputerName servername –Enable $true
  3. Create entries in the GlobalNames Zone

Demo: Configure a GlobalNames Zone using PowerShell

In this demo, we are going to configure the GlobalNames zone, and add an entry. It is possible to use the DNS management console to create the GlobalNames zone and add entries, however, I have chosen not to demo that here, and instead focus on using PowerShell

This lab environment consists of four Windows Server 2012 R2 domain controllers. They are all in the same forest and all have DNS installed. The domain controller placement is as follows:

DC01 & DC02 - contoso.com (forest root domain)
DC03 - canada.contoso.com (child domain)
DC04 - wingtiptoys.com (tree domain)

Step 1: Create a new AD Integrated zone called ‘GlobalNames’ and set it to replicate to the entire forest, then verify the zone was created:

Add-DnsServerPrimaryZone -Name GlobalNames -ReplicationScope Forest

Get-DnsServerZone | Where ZoneName -eq "GlobalNames"


Step 2: Activate the GlobalNames zone on each DNS server in the forest. In this case we want to activate it on all four domain controllers, so in order to save a bit of time, we can use a foreach loop.

$servers = "DC01","DC02","DC03","DC04"
foreach ($dnsserver in $servers)
{
    Set-DnsServerGlobalNameZone -ComputerName $dnsserver -Enable $true
}




Step 3: Create an entry in the GlobalNames zone. We are going to create a single-label name called financeapp and point it to webapp25.contoso.com, then verify that it was created.

Add-DnsServerResourceRecordCName -ZoneName GlobalNames`
-HostNameAlias "webapp25.contoso.com" -Name "financeapp"

Get-DnsServerResourceRecord -ZoneName GlobalNames -RRType CName

That's all there is too it. Creating and managing a GlobalNames zone using PowerShell is relatively simple.

Have a great week everyone!

Monday, December 4, 2017

Printing 4 Copies Per Sheet In Word 2016

Just the other day I was presented with a request to put a one page, letter size Word document 4 times on a single sheet of letter paper. The end goal was simply to be able to print out 4 copies per page to create postcard sized invitations. I wasn't sure how to go about this, but after putting together a few Google search results, I came up with the answer.

We'll start with the completed document, which was a full page Christmas party invitation.


  1. Click on 'File | Print', and chose the printer you wish to print to. Now, in my case, I wanted to be able to send the document to someone else for printing, so I chose 'Microsoft Print to PDF' for my printer.
  2. Under 'Settings', then 'Pages', enter 1,1,1,1   * This tells Word that you want page 1 of the document printed four times.
  3. At the bottom of the list of settings, change the number of pages per sheet from '1 Page Per Sheet' to '4 Pages Per Sheet'
  4. Click 'Print'


And that was it! Simple, but effective. Here is the resultant PDF document that was created.



While this is a fairly simple procedure, it actually took reading three different articles to figure out the steps to this problem. Hopefully this will save someone else the hassle of multiple searches.

Have a great week everyone!

Monday, April 10, 2017

Additional Online Resources for the 70-740 Exam

Although I have not yet officially started studying for the 70-740 exam, I am already starting to compile a list of additional online resources that I will be using to study for the new Windows Server 2016 exam.

I will be breaking this list down, not just by objective but also by sub-objective. Doing this, I hope to add some additional clarity as to which resource is for which topic. I will also add in some additional material which may not be directly related to the exam, but will help to reinforce or augment the knowledge required to pass the exam.

I hope you find this list useful, and as always, if you have resources you would like to see added to this list, just let me know and I'll make sure to include them.


Most recent update: April 7, 2017

Downloads
New 04/07 - Windows Server 2016 Evaluation

General Information
New 04/07 - 70-740 Exam Objectives
New 04/07 - Disjoint Namespace


Objective 1 - Install Windows Servers in host and compute environments

Objective 1.1 - Install, upgrade, and migrate servers and workloads
New 04/07 - Server Migration PowerShell cmdlets
New 04/07 - Migrating Roles and Features in Windows Server
New 04/07 - Windows 10 deployment tools


Objective 2 - Implement storage solutions


Objective 3 - Implement Hyper-V


Objective 4 - Implement Windows containers


Objective 5 - Implement high availability


Objective 6 - Maintain and monitor server environments


Sunday, May 17, 2015

Can You Promote a DC With the RID Master Offline?

While in a 70-411 class, the question came up "What would happen if you tried to promote a member server to a Domain Controller while the RID Master FSMO (Flexible Single Master Operations) role holder was offline?". We tossed around the thought for a few minutes, but could not come up with a definite answer. At that point, I declared "Experiment time!", and made the decision to explore this once I got home to my lab.

At times like this, I am glad I keep a few virtual machines (VMs) ready to go. It really helps to speed up the process of running tests such as these.

Here is the configuration of the environment and task list that I used for this test.
  • All servers are running Windows Server 2012 R2 Datacenter
  • Server1 - First installed DC - DNS & GC installed
  • Server2 - Third installed DC - DNS & GC installed
  • Server3 - Second installed DC - DNS & GC installed
  • Server4 - Standalone server
  • Ran all Windows updates on the three DCs
  • Transferred the RID Master role from Server1 to Server3 using Active Directory Users and Computers
  • Verified the transfer of the RID Master role using netdom query fsmo
  • Shut down Server3 (RID Master)
  • Added the Active Directory Domain Services role to Server4
  • Changed the client DNS on Server 4 to point to Server1 (I've been caught enough times with failed attempts at promotion due to mis-configured DNS that I know to change this before promotion)
  • Launched the AD Configuration Wizard
  • After working through the wizard, it failed on the "Prerequisites Check" page due to the RID Master being unavailable.
  • Powered up Server3
  • Reran the prerequisites check
  • At this point, I could successfully promote Server4 to a DC.
So, long story short, a Domain Controller promotion will fail the prerequisites check if you try to perform the operation while the domain RID Master is offline or otherwise unavailable. The specific error displayed is "Verification of prerequisites for Domain Controller promotion failed. You cannot install an additional domain controller at this time because the RID master <server name> is offline.".


Have a great week everyone!






Monday, March 2, 2015

Additional Online Resources for the 70-412 Exam

As I am doing for my Microsoft 70-410 and 70-411 notes, I am also compiling a list of links to additional online resources and videos that are relevant to the Microsoft 70-412 exam. These links have been gathered from a variety of sources that I have used while studying for the exam.

I will be adding additional links here over the next few months, so be sure to check back now and again. Once the list is finished, I'll change the post to reflect this fact. In the mean time, I'll make an effort to mark all new links as I add them.

I also made an effort to break down the list by exam objective where possible. Some links are clearly outside of the scope of the exam, but I figure some extra knowledge here and there can only benefit a person's learning. Where appropriate, I have added these extra links to each section where I felt they would be of greatest use. I know I find little nuggets of extra information that are outside the exam objectives often help to solidify my understanding of core topics.

So, without further delay, here is the list:



*Most recent update: December 13, 2016

Downloads
General Information
Objective 1 - Configure and manage high availability
Configure and Manage the Quorum in a Windows Server 2012 Failover Cluster
Balancing Act – What you really ought to know about Windows Server NLB
File Share witness vs Disk witness for local clusters
Configuring Windows Failover Cluster Networks

Objective 2 - Configure file and storage solutions
Objective 3 - Implement business continuity and disaster recovery

Objective 4 - Configure Network Services
Objective 5 - Configure the Active Directory infrastructure
Adding additional domain controller
New 12/07 - Set-ADDomainMode
New 12/07 - Set-ADForestMode
New 12/07 - Set-ADForest
New 12/07 - Repadmin
New 12/07 - Dfsrmig

Objective 6 - Configure Identity and Access Solutions

Tuesday, February 3, 2015

Additional Online Resources for the 70-411 Exam

Although I have written and passed the Microsoft 70-411 exam, I have chosen to keep this list in place, in the hopes that others will find it's contents useful. It is quite a lengthy list of links to additional online reading and videos that I have collected from several sources, and I have found them to be quite valuable.

Unless someone shares any new resources with me, this list will remain fairly static from now on. If I do add any new links, I'll make an effort to mark them as new.

I also made an effort to break down the list by exam objective where possible. Some links are clearly outside of the scope of the exam, but I figure some extra knowledge here and there can only benefit a person's learning. Where appropriate, I have added these extra links to each section where I felt they would be of greatest use. I know I find little nuggets of extra information that are outside the exam objectives often help to solidify my understanding of core topics.

So, without further delay, here is the list:


*Most recent update: November 20, 2015

Downloads
PowerShell

General Information

Advanced Topics

Objective 1 - Deploy, manage, and maintain servers
Objective 2 - Configure File and Print Services
Objective 3 - Configure network services and access
Objective 4 - Configure a Network Policy Server (NPS) infrastructure

Objective 5 - Configure and manage Active Directory
Objective 6 - Configure and manage Group Policy