Showing posts with label Windows Server 2012. Show all posts
Showing posts with label Windows Server 2012. Show all posts

2014/01/01

Top Five 2013 LazyWinAdmin Blog Posts

The year 2013 has been a pretty good year for the LazyWinAdmin blog.
Thank you guys for following my blog and participating to the comments discussions. Thanks also for those who give me advices, critics and ideas to improve my scripts, I think It helps everyone (and myself) to improve our knowledge everyday, Really appreciated :-)

I get more and more page views, comments,... every month  :-) and I thought It would be nice to give a small Top Five 2013 of the LazyWinAdmin blog posts.



Top Five 2013 Blog posts:


WS2012 Storage - NFS Server - Configure NFS for VMware vSphere 5.1 Home Lab
This article focus on how to configure NFS on Windows Server 2012 with PowerShell for a VMware vSphere 5.1 host.


PowerShell Studio 2012 - WinForms - Creating a basic GUI (Video) 
This is a quick tutorial (with a video) on how to create a really basic Winform/Graphical User Interface (GUI) using SAPIEN PowerShell Studio 2012.


PowerShell - Monitor and Report Active Directory Group Membership Change
This is probably one of my most popular script. This PowerShell script let you monitor membership of one or multiple groups. You can specify the names of the group(s) directly, from a file or from an OU path.

PowerShell - Get a SubString out of a String using RegEx 
In 2013 I started playing a bit more with Regex, this post talked about getting text from a string. I'll post more about this subject soon.

PowerShell 4.0 is now available
The team of Jeffery Snover, the PowerShell Team,  realeased a new version of this awesome tool ! more cmdlets!! more fun!!



Thanks for reading! If you have any questions, leave a comment or send me an email at fxcat@lazywinadmin.com. I invite you to follow me on Twitter @lazywinadm / Google+ / LinkedIn. You can also follow the LazyWinAdmin Blog on Facebook Page and Google+ Page.

2013/08/15

WS2012 Storage - Creating a Storage Pool and a Storage Space (aka Virtual Disk) using PowerShell

In my previous posts I talked about how to use NFS and iSCSI technologies hosted on Windows Server 2012 and how to deploy those to my Home Lab ESXi servers.

One point I did not covered was: How to do the Initial setup with the physical disk, Storage pooling and the creating the Virtual Disk(s) ?

The cost to acquire and manage highly available and reliable storage can represent a significant part of the IT budget. Windows Server 2012 addresses this issue by delivering a sophisticated virtualized storage feature called Storage Spaces as part of the WS2012 Storage platform. This provides an alternative option for companies that require advanced storage capabilities at lower price point.

2013/07/16

WS2012 Storage - iSCSI Target Server - Configuring an iSCSI Initiator on VMware vSphere 5.1


I recently switched the backend storage of my VMware vSphere 5.1 Home Lab from FreeNas (OS based on UNIX) to iSCSI (Windows Server 2012 Storage Feature). The reason is that I wanted to play with the PowerShell iSCSI modules and do some tests with SMB v3.0.

In a previous post I showed how to create an iSCSI target using PowerShell on Windows Server 2012. Today I will demonstrate how I set the VMware vSphere 5.1 Software iSCSI Adapter using PowerCli and create the datastore using the LUN created in my previous post. I won't cover how to assign the iSCSI traffic to a dedicated PortGroup and dedicated NICs.


2013/07/11

WS2012 Storage - iSCSI Target Server - Create an iSCSI target using PowerShell

For my Virtual Machines needs, some LUNS are presented to my VMware vSphere 5.1 Servers and until now, my lab storage was handle by FreeNas using iSCSI.
For tests purposes, I replaced this FreeNas by Windows Server 2012 to take care of that part.

Note: Before writing this post, I grouped my physical disks together into a container called storage pools to manage those disks as a single storage space. Afterwards, in these storage pools, I created virtual disks (aka LUN) on which I specify a layout, ... which is simply a raid level.


Overview

In the following post I will talk about the following points:
  • Quick iSCSI Terminology
  • Quick look at iSCSI Target Management (GUI and PowerShell iSCSI Modules)
  • Installing the Windows Feature iSCSI Server Target (PowerShell)
  • Creating a iSCSI Virtual Disk (aka LUN) (PowerShell)
  • Creating a iSCSI Target and assigning it to one or more initiator(s) (PowerShell)
    • Finding the iSCSI Qualified Name (IQN) (vSphere Client and PowerCLI)
  • Assigning a iSCSI Virtual Disk (LUN) to a iSCSI Target (PowerShell) 


Terminology


Note: The iSCSI protocol is fully documented by the RFC 3720 and RFC 3721

iSCSI: iSCSI stands for Internet Small Computer System Interface.
It's an Internet Protocol (IP)-based storage networking standard for linking data storage facilities.
iSCSI is used to facilitate data transfers over a network (LAN, WAN or Internet) and transferring data by carrying SCSI commands over IP networks. iSCSI leverages the Ethernet network and does not require any specialized hardware

source: http://blogs.technet.com/b/filecab/

iSCSI Target Server: is the server that shares the storage, it runs the iSCSI Target. The server (machine) consumes the storage is called iSCSI initiator.

iSCSI Initiator: Typically, it is an application server. For example, iSCSI Target provides storage to a SQL server, the SQL server will be the iSCSI initiator in this deployment.

Target: It is an object which allows the iSCSI initiator to make a connection. The Target keeps track of the initiators which are allowed to be connected to it. The Target also keeps track of the iSCSI virtual disks which are associated with it. Once the initiator establishes the connection to the Target, all the iSCSI virtual disks associated with the Target will be accessible by the initiator.

iSCSI Virtual Disk: It also referred to as iSCSI LUN. It is the object which can be mounted by the iSCSI initiator. On Windows Server 2012, the iSCSI virtual disk is backed by the VHD file.

iSCSI Connection: iSCSI initiator makes a connection to the iSCSI Target Server by logging on to a Target. There could be multiple Targets on the iSCSI Target Server, each Target can be accessed by a defined list of initiators. Multiple initiators can make connections to the same Target. However, this type of configuration is only supported with clustering. Because when multiple initiators connects to the same Target, all the initiators can read/write to the same set of iSCSI virtual disks, if there is no clustering (or equivalent process) to govern the disk access, corruption will occur. With Clustering, only one machine is allowed to access the iSCSI virtual disk at one time.

IQN: iSCSI Qualified Name. It is a unique identifier of the Target or Initiator. The Target IQN is shown when it is created on the Server. The initiator IQN can be found by typing a simple "iscsicli" cmd in the command window or using Get-InitiatorPort in PowerShell

Using iscsicli

Using PowerShell (module iSCSI) with the Cmdlet Get-InitiatorPort

2013/06/26

What's New in Windows PowerShell 4.0

Microsoft just updated the page "What's New in PowerShell" to include information about Windows PowerShell 4.0. They also added a page about Desired State Configuration.

You can try PowerShell 4.0 by either downloading the Windows Server 2012 R2 Preview which has been release just a few hours ago, or by doing the Desired State Configuration Lab from Channel9.

I highly encourage you to check-out this documentation. From my point of view, the following features are very interesting:

2013/03/05

The Simplest Way to Create a Bootable Windows Server 2012 or Windows 8 USB Key

After I passed my VCP510-DV last week, I wanted to rebuild my Home Lab using Windows Server 2012 for the Storage part, instead of FreeNas.

Part of the rebuild, I needed to install Windows Server 2012 on top of the old FreeNas box. Hard task since I don't have a DVD player in the case... :-/

Hence, USB Boot it is...

I was surprise to see how easy it is to create a Bootable Windows Server 2012 (R1 or R2)/Windows 8/8.1 USB Key.

What do you need:




Once Installed, Launch Windows 7 USB/Download Tool
The first step is to select your ISO

2013/01/20

WS2012 Storage - NFS Server - Configure NFS for VMware vSphere 5.1 Home Lab


The following procedure show how to setup a NFS Server hosted on Windows Server 2012 for backend storage of my VMware vSphere Server 5.1 Home Lab.

You can also check my post on Creating an iSCSI Target Server on Windows Server 2012.





Overview

In the following post I will talk about the following points:
  • Terminology
  • Using PowerShell
    • Add the Role NFS Server Feature on Microsoft Windows Server 2012
    • Create the Share and Set the NFS permissions
    • Add the NFS datastore to VMware vSphere 5.1
  • Using the GUI (Graphical User Interface)
    • Add the Role NFS Server Feature on Microsoft Windows Server 2012
    • Create the Share and Set the NFS permissions
    • Add the NFS datastore to VMware vSphere 5.1


NFS Storage

Quick overview of my NFS Service architecture in my Home Lab


2012/08/24

Introduction to CIM Cmdlets

Great article from the Powershell team blog:

Introduction to CIM Cmdlets

PowerShell 3.0 shipping with Windows server 2012 and Windows 8 brings a new set of Cmdlets to manage any server or device that complies with CIM and WS-Man standards defined by DMTF. In this blog post we will explore these new Cmdlets and how can they help IT Pros in managing a datacenter.
The list of new Cmdlets is given in the table below:
Cmdlet Purpose
Get-CimInstance Gets instances of a class.
New-CimInstance Creates a new instance of a class.
Remove-CimInstance Removes one of more instances of a class.
Set-CimInstance Modifies one or more instances of a class.
Get-CimAssociatedInstance Gets all the associated instances for a particular instance.
Invoke-CimMethod Invokes instance or static method of a class.
Get-CimClass Gets class schema of a CIM class.
Register-CimIndicationEvent Helps subscribe to events.
New-CimSession Creates a CIM Session with local or a remote machine
Get-CimSession Gets a list of CIM Sessions that have been made.
Remove-CimSession Removes CimSessions that are there on a machine.
New-CimSessionOption Creates a set of options that can be used while creating a CIM session.

Basic terminology

If you are already familiar with terms like WMI, CIM, WinRM and WS-Man, you can skip this section.
CIM: Common Information Model (CIM) is the DMTF standard [DSP0004] for describing the structure and behavior of managed resources such as storage, network, or software components.
WMI: Windows Management Instrumentation (WMI) is a CIM server that implements the CIM standard on Windows.
WS-Man: WS-Management (WS-Man) protocol is a SOAP-based, firewall-friendly protocol for management clients to communicate with CIM servers.
WinRM: Windows Remote Management (WinRM) is the Microsoft implementation of the WS-Man protocol on Windows.

Introduction to CIM Cmdlets