Getting started with github

In this post, we’ll explore how to use github(https://github.com) and few basic steps such as creating repository, making some changes and commit our changes. In this age of devops, it is an essential skills to have for IT pros as well. Not that you’ll need to start writing code in .net or node.js but github is home to most open source projects even for PowerShell code. A lot of folks have moved to put their PowerShell module/scripts on github.

To get started, you’ll need to have a account on https://github.com. Once you have created an account, you can start creating project. In github terms, a repository is equivalent of a project. You would place all code belonging to project in the repository. …Continue Reading

How-to determine PowerShell version

If you need to know which PowerShell version is installed on your machine, use automatic variable $PSVersiontable. Here’s output for same from my machine:

PS C:\Windows\system32> $PSVersionTable

Name Value
---- -----
PSVersion 5.0.10586.494
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.494
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

If you just need version, use $PSVersionTable.PSVersion:

PS C:\Windows\system32> $PSVersionTable.PSVersion

Major Minor Build Revision
----- ----- ----- --------
5 0 10586 494

 

Update PowerShell help files

Sometimes, you are running a cmdlet for a first time, and want to check its help file but unfortunately it displays very basic information or no info at all, other than the syntax.

In such cases, if your machine is connected to internet, you can use below command to update help files (do this from a powershell prompt running as administrator):

Update-Help -Force

If your machine is offline …Continue Reading

Resolving conflicts in Azure DNS

An conflict may occur in Azure DNS if two people or two processes try to modify a DNS record at the same time. How can you it determine which one wins? And does the winner know that they’ve just overwritten changes created by someone else?

Azure DNS uses Etags to handle concurrent changes to the same resource safely. Each DNS resource (zone or record set) has an Etag associated with it. Whenever a resource is retrieved, its Etag is also retrieved. When updating a resource, you(or the creator of DNS record) have the option to pass back the Etag so Azure DNS can verify that the Etag on the server matches. Since each update …Continue Reading

About PackageManagement and PowerShellGet

New versions of Windows server and client operating systems i.e. windows 10 and windows server 2012 R2 or higher, contains a new feature named as PackageManagement. This should be of particular importance to DevOps folks as it intends to simplify their lives.

Why PackageManagement Feature?

DevOps folks can come with reasons like why do they require another tool in the wild when they already have a choice like chef, puppet etc. The truth is that …Continue Reading

Create Azure DNS zone and records

The most of internet relies on TCP/IP protocol. In order to reach a service/machine, you need to know its ip address. In its essence, DNS or Domain Name System is a network service which is responsible for resolving a website/service name to its IP address. Azure DNS is a hosting service for DNS domains, providing name resolution using Microsoft Azure infrastructure. It uses Anycast networking, so DNS resolution occurs from closet available DNS server.

In order to start hosting your domain, …Continue Reading