2014/04/30

PowerShell Summit 2014 NA - Day 2

Another day of PowerShell Awesomeness !!!  Learned a ton of things today !! Made some new PowerShell friends ANDDD met so many PowerShell Team members!! Nana, John Slack, Bruce,...etc... and Diane Dubois a new member from France! It was a great surprise! Awesome! I was really not expecting to speak French at the summit ;-)

Note: The names of the PowerShell Team members might not be correct, sorry about that (please correct me!)

PshSummit 2014 NA serie posts:
PowerShell Summit 2014 NA - Day 1
PowerShell Summit 2014 NA - Iron Scripter Competition
PowerShell Summit 2014 NA - Day 2 (current post)
PowerShell Summit 2014 NA - Day 3

2014/04/29

PowerShell Summit 2014 NA - Iron Scripter scenario

Monday evening, the PowerShell Summit 2014 NA organized an Iron Scripter competition. The goal was to fix/create 3 scripts and to get them rated by 3 juges. We had 45 minutes to complete everything, including time for the juges to score the scripts.

PshSummit 2014 NA serie posts:
PowerShell Summit 2014 NA - Day 1
PowerShell Summit 2014 NA - Iron Scripter Competition (current post)
PowerShell Summit 2014 NA - Day 2
PowerShell Summit 2014 NA - Day 3

PowerShell Summit 2014 NA - Day 1

The PowerShell Summit 2014 North America kicked off this morning ! What a day! The organizers really did an Awesome Work!! Great Summit so far! This event is a great opportunity to meet old friends, make some new ones and put faces on names.

I also took this opportunity to bring a couple of PowerShell books, and get them signed by authors (a lot of them are at the summit).


For me it was kind of a long day, I am still jet lagged and couldn't sleep anymore when I woke up at 5am. After a 30 min run and a small breakfast I was on my way to the Summit.

2014/04/07

PowerShell - Playing with the new OneGet module (v5 preview)

One very cool thing in the last Windows Management Framework V5 Preview release is the new module OneGet which allow us to manage a list of software repositories, search/acquire/install/uninstall package(s).

This has been present in the Linux world for a very long time, for example with APT-GET (Debian). This new feature is basically a global silent installer for applications and tools. We should also be able to do configuration tasks and anything that you can do with PowerShell. The power you hold with a module like OneGet is only limited by your imagination! :-)

Note that this is a preview, there is no documentation yet, the features and behavior are likely to change before the final release.

OneGet Module ?

OneGet is a new way to discover and install software packages from around the web. With OneGet, you can:
  • Manage a list of software repositories in which packages can be searched, acquired, and installed
  • Search and filter your repositories to find the packages you need
  • Seamlessly install and uninstall packages from one or more repositories with a single PowerShell command

2014/04/06

PowerShell - PowerShell v5 "Preview" available


Wow that was really fast!! In case you missed it last week, PowerShell 5.0 "Preview" has been released by Microsoft part of Windows Management Framework 5.0 (WMF 5.0) Preview. The release of the version 4 was not so long ago (October 2013), Microsoft is definitely increasing the pace of releases.

Download WMF v5 here.



What's New?

This preview release brings the following update/features:
  • Update of PowerShell Desired State Configuration: performance improvements + bug fixes,
  • Module OneGet to manage lists of software repositories, search/acquire/install/uninstall packages 
  • Module NetworkSwitch. to manage Windows network switches

In my opinion, the coolest feature is the module OneGet which allows you manage/install/uninstall packages,  (Linux world has something similar called Apt-Get for a very long time). I think this is a very good news and it will had more flexibility to the sysadmin work.

Once installed,  $PSVersionTable will report the following result :-)  PSVersion: 5.0.9701.0



Upgraded :-)

2014/04/05

PowerShell - Get a list of my domain Organizational Units

Quick post, last week my coworker Andrey needed to list all the Organization Units in the domain by Canonical Name. I thought sharing the PowerShell One-Liner magic could save time to some people out there.

In the following examples two methods to retrieve the information using Active Directory and ADSI/NET.



Active Directory Module

I found two ways to get this information using this module
  • Get-ADOrganizationUnit
  • Get-ADObject

First we need to verify if the module is loaded and then search for Cmdlet that could meet our needs.
# Check if the ActiveDirectory module is Loaded
Get-Module -Name ActiveDirevtory

# Check if the ActiveDirectory module is available
Get-Module -Name ActiveDirectory -ListAvailable

# Import the ActiveDirectory module
Import-Module -Name ActiveDirectory

# Find Cmdlets in the ActiveDirectory related to OrganizationalUnit
Get-Command -Module ActiveDirectory -Name *OrganizationalUnit*

2014/04/04

PowerShell - Get/Set the Network Level Authentication Remotely (RDP Setting)

A few days ago I was in a training class out of the office with one of my work colleague. During the class he tried to connect to work using our Citrix (SRA) portal when he realized that his computer at work (freshly re-installed with Windows 8.1) was not allowing him to connect because of the Network Level Authentication.

Error message: "The remote computer that you are trying to connect to requires Network Level Authentication (NLA), but your Windows domain controller cannot be contacted to perform NLA. If you are an administrator on the remote computer, you can disable NLA by using the options on the Remote tab of the System Properties dialog box."


Before I talk about the workaround and the PowerShell script we used to fix that, let's investigate in order to understand the problem.