Sunday, August 23, 2020

How to Delete a Repository in GitHub

A few weeks ago, after spending several days learning about Git and GitHub, I was ready to clean up my lab environment. Unfortunately, one of the things I didn't learn, was how to delete a repository on GitHub. It took a bit of digging, but I was able to find out how to delete a repository. So, in the interest of saving others some time, here's how to delete a repository on GitHub.

If you'd rather watch me demo this, there's a short video on the TechSnips YouTube channel.



The Current Situation

We'll start out by taking a look at our local repo. A quick ls shows us that we have two files, Awesome-Script-2.ps1 and our README.md file.
Running git status shows us that we are on the master branch, with nothing to commit, and we are up to date with our repo on GitHub.
Over on GitHub, we can see that the Awesome-Script-2 repository contains the same two files.

Disconnect the Local Repository from GitHub

As we're looking to keep our local repository intact on our local computer, we simply need to run git remote remove origin to disconnect the GitHub repository from our local one. We can confirm this worked by running git status, which shows us that we are no longer connected to GitHub, as the message about being up to date is now gone.


Delete the GitHub Repository

Back over to GitHub! To delete the Awesome-Script-2 repository, we need to click on 'Settings'.
Then we need to scroll all the way to the 'Danger Zone' at the bottom of the page. (Does anyone else feel a song coming on?) Here is where we'll find the option we're looking for. Click on 'Delete this repository', then enter the repository name to confirm.
Finally we can click on 'I understand the consequences, delete this repository'.
Back on the home screen we can see the confirmation that the repository was successfully deleted.
That's all there is to it!

Wednesday, August 21, 2019

Set-DnsClientServerAddress - PowerShell Cmdlet of the Week

Next up in this series is a cmdlet I use quite often:

Set-DnsClientServerAddress

This cmdlet is especially useful when you need to statically assign the DNS servers that a client will use, and, in what order they will attempt to use them. My usual use case for this is in my lab environment where almost all of the servers have statically assigned IP address and DNS servers.

If you'd rather watch me demo this, there's a short video on TechSnips that also describes this cmdlet.
How To Set The DNS Server Search Order On Windows With PowerShell

So, to get started, let's take a quick look at the current list of DNS servers.

Along with Get-DnsClientServerAddress, we'll use the parameter -AddressFamily IPv4 allowing us to specify that we only want to see the IPv4 addresses. To see both IPv4 and IPv6, we would simply omit this parameter.


As we can see here, there are currently two DNS servers listed here. What we're going to do, is change the order of the original two, and add a third DNS server that was just recently brought online. To do this, we'll enter:

Set-DnsClientServerAddress -InterfaceIndex 10 `
-ServerAddresses 192.168.2.32,192.168.2.31,192.168.2.56

To break down this list of Parameters:
-InterfaceIndex 10
     - We use this to specify the interface. This info comes from the previous command

-ServerAddresses 192.168.2.32,192.168.2.31,192.168.2.56
     - A comma-separated list of our DNS servers, in the desired order.

One important note: Be sure to type in all of the DNS server addresses into this cmdlet, as it does not append to the existing list, it replaces it completely.

To confirm this worked, we'll just use Get-DnsClientServerAddress one more time:


There it is, our DNS server list has been modified as we expected.

That's all there is to it!

Friday, August 16, 2019

How Did I Arrive at TechSnips?

I wrote this article about a year ago for TechSnips. Fast-forward to today, TechSnips is no longer hosting blog posts, so I have slightly updated this article and re-posted it here on The Frozen Geek. While this isn't, strictly speaking, a technical post, this seemed to be the best place for it. Enjoy!


Where I Came From

It’s been about 5 years since I decided that I was no longer content to simply use the Internet as a source of information. I knew at that time that I wanted to give back to the online IT community that had helped my career along for so many years. It seemed that the easiest way to begin was to start a blog. Since I already had one created, one that had been all but abandoned, I thought this was a good place to start.

So, in May 2014 I started blogging. I started off by writing once a week about what I had learned during my MSCE studies, as it gave me a good, constant source of ideas. A few months later, I decided to launch a second blog that would focus primarily on Windows Server and PowerShell tips & tricks, guides, lab setups, and walk-throughs. This is where I ran into a bit of a wall.

I was struggling to find ideas that I thought would be interesting to others. The “Imposter Syndrome” was in full force. I just didn’t think I had anything worth sharing, certainly nothing that hadn’t already been done before. That is where I finally stalled out and all but quit writing.

Over the next few years, my writings continued but were quite sporadic as I was still struggling to come up with ideas. It wasn’t until I read an article by Don Jones titled Become the Master, or Go Away that I realized just how much this imposter syndrome was holding me back.

It didn’t immediately break me out of my shell, but it did help me renew my interest in writing. I even thought about creating videos to go along with the blog posts. I still had the same problem though, no idea about what to write about.

How I Got Here

I have always found it interesting how timing plays such an important role in life, and this is one of those times. I had just finished reading “Be the Master” by Don Jones, and found myself resolved to start doing something right away. A few days later I read a guest post written by Adam Bertram on the blog hosted by Mike F. Robbins. The article, TechSnips is Looking for Content and Recruiting Contributors was a good read, and I felt that it was something I should seriously look at.

By the time I got to this part of the article: “You will learn presentation skills through feedback from myself and your peers…” I had already decided that this was something I was going to do. No doubt about it. A chance to record how-to videos sounded like a great idea. Then I read the words “and you will get paid”. This was the icing on the cake!

So, I clicked on the sign-up link, provided the required information, and submitted an audition video. Waiting to see if I would be accepted as a contributor was the longest 14 hours ever. I finally received the e-mail I had hoped for! I was accepted as a contributor to TechSnips, and I was even provided with feedback on this video so that I could improve the next video I recorded.

My Experience So Far

I didn’t know it at the time, but one of the first things I would learn about TechSnips is that everything moves quickly. It can be quite a refreshing change of pace if you’re frustrated by things moving at a slower cadence. I have found that pace to be very motivating and quite exciting, and I love the fact that changes to TechSnips are made quickly and frequently as the business evolves. Keeping up with the changes was a challenge at first, but I quickly adjusted.

One of those changes that were made during my first few weeks was the introduction of contributor blog posts. The thing I enjoyed most about that change was the fact that Adam went from ‘No, I don’t think we are going to do blog posts’ to ‘yes we are, and here’s how we are going to do it’ inside of a single sentence. So, as you can see, changes are made rapidly.

The second lesson I learned was that there is always feedback being provided, and at every stage of the production process. For me, this advice is invaluable, as I am quite new to producing videos. The great thing about the advice is that it doesn’t just come from Adam but from everyone. If you have a question, whether it be about submitting a video, or setting up a recording environment on a budget, a quick post to the Slack channel will usually elicit a rapid response with helpful and valuable advice.

Having access to this group of professionals has been a wonderful learning experience, as everyone brings their own skills and unique point of view to the team.

TechSnips also successfully addressed the issue I was having with generating ideas. There is always a constant supply of ideas, both from the other contributors, subscribers and sometimes from Adam himself. Once I took a look through those lists of ideas, I realized just how much I had to offer the community. Imposter syndrome….deleted! Well, not entirely, but it isn’t as ever-present as it used to be.

The production quality at TechSnips impressed me right from day one. Every time I submit a video or a blog post, I think to myself “Yeah, that looks pretty good.” Then the editors get a hold of it and give it this incredibly polished look. I will confess to being happily surprised at how good that first video looked after the editing was complete. Now, I find myself anxiously awaiting the final product every time I submit a new video. I just can’t wait to see how good they look.

I am having an absolutely fantastic time with TechSnips! I haven’t had this much fun or felt this excited to work on a new project in a very long time. The sense of teamwork, constant advice, support, and being able to see my content published alongside so many other professionals has been quite rewarding. I cannot think of anywhere better to spread my wings and learn some new skills. I have found everything I need here; Training, guidance, teamwork, ideas, and enough work and excitement to keep me coming back for more.

I would highly recommend to anyone who is thinking about publishing content to give TechSnips a try. There is nothing to lose from the attempt, and so very much to gain.

Photo by daniel baylis on Unsplash

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