Free training resources available from Microsoft

I am always trying to learn about the latest technology and love having the word FREE associated with it. If you already have your Server 2008 certification, there is a Microsoft Jump Start 2 day online class for Server 2012 coming up on 10/23-24. There are quite a few of these Jump Start classes being offered. There is an Administering Office 365 and Developing Windows 8 App Jump Start as well as a few other options. Go checkout the Microsoft Certified Connection Community.

Another great offering is the Microsoft Virtual Academy. This provides quick access to a learning path for the different Microsoft technologies that is taken at your pace.

PowerShell 3.0 ISE ponderings

I have played around some with PowerShell and written a few pretty cool scripts to make some administration tasks easier. All of this was done with PowerShell 2.0. I use PowerGui as my editor of choice currently. It provided Intellisense that was not available with PowerShell 2.0 or the ISE.

I attended PowerShell Saturday here in Charlotte, NC on 9/15/2012. Ed Wilson, the current Microsoft Scripting Guy, kicked off the day. And what a day it was. If you have any desire to learn PowerShell, check out his blog as well as the Hey Scripting Guy! articles he publishes daily.

Now all that being said, I have started looking into PowerShell 3.0 which released when Windows Server 2012 did. There is an ISE, Integrated Scripting Environment, that is a host application for Windows PowerShell. This also existed for version 2.0 but has many improvements with the 3.0 release. Version 3 includes Intellisense very similar to what is available in Visual Studio. The ISE incorporates a script window, console and a vertical Add-on Tools pane. You can customize this to include all 3 or any combination.

As PowerShell has evolved, it has become more powerful. For example, version 2 had approximately 200 cmdlets. If there was not an existing cmdlet to achieve what you wanted to do, you could write your own or locate one that someone else had written and shared. Now enter today and PowerShell 3. There are over 2200 cmdlets included with this new release.

When I started using PowerShell, I was happy that they included DOS commands for things like dir and cd. Little did I know, but these are actually aliases that were created within PowerShell to provide quick access to things like the Get-ChildItem command. As you can see, both commands, dir and Get-ChildItem, return the same data:

image

You can find an entire list of aliases by entering Get-Alias.

There are also some very nice help options within the ISE. There is a Command Add-on that allows you to select a given command and see what options and parameter are available, as well as the ones that are mandatory. If a field is required, it is denoted by an asterisks. I chose the Get-AdUser cmdlet. As you can see, the Filter: parameter is required. From this Add-On, you can choose to Run, Insert, or Copy the command with the specified parameters.

image

There is also a new cmdlet named Show-Command that will provide this input box for the requested command if you decide not to have the Command Add-in loaded. Both of these options provide a GUI interface to visually see the required arguments and available parameters for any given command. If you enter Show-Command –Name Get-AdUser in the console, a pop-up window is displayed that contains the same information and functionality provided by the Command Add-On for Get-AdUser.

Another cool feature of the script window within the ISE is the ability to override the PowerShell ExecutionPolicy on a machine. A script is simply a group of commands that are executed together. You can enter this group of commands into the script window and execute them as one. As long as you have not saved the script, this will work around the execution policy. As soon as you save the script, the ExecutionPolicy is enforced and your script may or may not run. To see what your ExecutionPolicy is set to, you can run the cmdlet, Get-ExecutionPolicy. This becomes important if you are trying to run scripts that were downloaded from the internet. If your execution policy is set to Restricted, you will not be able to run these. A way around this is to using the script editor in ISE. You can copy the commands from your downloaded script into a new script window and run it.

I hope that these tips help you. I will continue to provide useful information as I work more with this interface.

Terri is a Support Specialist at OrcsWeb, a hosted server company providing managed hosting solutions.

Powershell Saturday 002

I was lucky enough to get to attend the Powershell Saturday event on 9/15. It was at the Microsoft Office in Charlotte. Ed Wilson, Hey, ScriptingGuy, was awesome. I love listening to people that get the technology that they talk about. He was energetic and fun. This was a great introduction to advanced day of learning for everyone. I would recommend this to anyone interested in learning more.

Terri is a Support Specialist at OrcsWeb, a hosted server company providing managed hosting solutions.

Find files with PowerShell

I struggle every day with the Search capabilities of Windows 7. I know there is no way I am the only person that has this problem. Found this great way to do a search of a location (local or UNC share) using PowerShell. This command will search the provided location recursively for all files matching a given criteria will output the list to a text file. I was wanting a full list of all music files in my iTunes library and used this gather that list. I will then able to clean-up as needed and was pleasantly surprised by some of the music that I have that was ‘forgotten’.

Get-ChildItem “file_location” -Recurse -Include “*.mp*”,”*.m4*” | foreach-object {$_.Fullname} | Out-File c:music.txt –width 1024

Have fun with this one. I know it has made my life easier.

 

Using Web Platform Installer command line tool to perform offline installs

Updated since WebPICmd.exe is now included with WebPI rather than as a separate download.

I have come across several forum posts by individuals about doing offline installs for computers that do not have internet connectivity. This should apply to most servers within a corporate environment. A server should only have internet connectivity if there is a business reason for it. Since I have come across this multiple times, I figured I would write a blog about it.

There is a command line utility that is included with the Web Platform Installer. You can find it here. Once you have installed WebPI, the WebPICmd.exe (command line installer) will be located in c:Program FilesMicrosoftWeb Platform Installer.

I wanted to use this application to prep for a PHP54 and PHPManager offline install. The beauty of this application is that it determines dependencies and downloads those as well if they are not already installed. For best results, you would want to run this on a machine that closely matches the machine that you are going to be porting the offline cache data to so that you don’t run into issues where you did not download a dependency that the target server needs. You can use All as the Product specification which literally creates an offline cache of all packages in the WPI feed. If you are not sure what you need on the target server, this is the safest option to ensure that you have everything you need when you start, but can be time consuming.

To begin with, I decided to take a look at what was installed on the server I was running this test on. To gather this information, I ran the following command:

c:Program FilesMicrosoftWeb Platform InstallerWebPICmd.exe /List /ListOption:Installed

This returned a list of all applications that have been installed by WebPI.

I then wanted to see all available installation packages so I ran the following command:

>c:Program FilesMicrosoftWeb Platform Installerwpicmd.exe /List /ListOption:Available

This provided a list of applications that could be installed or cached locally for future install. This is a snippet of the output from this command.

The software that you obtain using the Web Platform Installer Command Line Tool
is licensed to you by its owner.  Microsoft grants you no rights for third party
software.
Successfully Loaded Feed : https://go.microsoft.com/?linkid=9783679

Current language of installers is English

–Available Products
ID                   Title
—————————————-
AdvancedLogging      Advanced Logging
AppFabric            Windows Server AppFabric
ARRv2Update          Hotfix for Application Request Routing 2.1
AzureNodePowershell  Windows Azure SDK for Node.js – May 2012
AzureNodeSDK         Windows Azure SDK for Node.js – August 2012
AzurePHPSDK          Windows Azure SDK for PHP – August 2012
AzurePythonSDK       Windows Azure SDK for Python – June 2012
AzurePythonSDKCore   Windows Azure SDK for Python (Core) – June 2012
CustomLogging        IIS: Custom Logging
DACFX                Microsoft SQL Server 2012 Data-Tier Application Framework (
Latest)
DACFX_11_0           Microsoft SQL Server 2012 Data-Tier Application Framework 1
1.0 (April 2012)
DBManager            Database Manager 1.0
DbManagerUpdate      Database Manager 1.0 Hotfix
Django               Django 1.4 (Python)
DynamicIPRestrictionsRTW Dynamic IP Restrictions 1.0

Since I wanted to install PHP54 and PHPManager on my server, I scrolled through the list until I located those products to determine what the ProductID was.

PHP54                PHP 5.4.24
PHPManager           PHP Manager for IIS

I then ran the command to create an offline cache of these two applications and any dependent applications for install purposes.

>C:Program FilesMicrosoftWeb Platform InstallerWebPICMD.exe /Offline /Products:PHP54,PHPManager /Path:c:appsinstall

This created a local cache copy of all necessary data to install these packages with no internet connectivity. It also provides the exact command line to run to complete the install.

To use the new offline feed, please run the following from the command line:
WebPICmd.exe /Install /Products:<products you want> /XML:<Offline main feed>
Done !

Now for the fun part. I copied my offline-wpi directory to a USB drive and moved it over to a server that I had disabled the network card on. I created the same directory structure that I had on the original server (c:apps) and copied the offline-wpi folder to this location. That way I didn’t have to do any manual modification of the files that were created originally. The file location is listed in the xml file.

On the target machine, I opened a command prompt and entered the information from the Offline main feed output from the creation of the offline cache.

>c:Program FilesMicrosoftWeb Platform InstallerWebPICmd.exe /Install /Products:PHP54, PHPManager /XML:/c:/apps/install/feeds/latest/webproductlist.xml

After the install information is loaded, you are prompted to accept the license terms for each of the applications to be installed. Answer Y and the application is off to the races installing the requested applications. And last but not least, I had SUCCESS.

Verifying successful installation…
PHP Manager for IIS                                True
PHP 5.4.0                                          True
Install of Products: SUCCESS

Upon opening IIS Manager on the server, the PHP Manager plug-in icon was available for use and easy of administration of the installed PHP instance.

This is a very nifty tool that can provide nicely packaged applications for those protected servers that do not have internet access to download and install the applications natively.

I hope you find this information helpful.

Current ventures

So, I decided to try to learn some new development stuff to balance out my skills. Thanks to someone I work with at OrcsWeb, I got a really good tutorial for MVC3. I have been patiently working my way through this beginner’s guide to understand the parts and how they all work together.  I am also trying to get better with PowerShell since it is a great way to automate administrative tasks.

Samsung Galaxy S3

I upgraded my Motorola Atrix to the Samsung Galaxy S3 this week. The difference in the 2 phones is amazing. Part of this is due to the awesome screen and graphics on the S3. Another difference is ice cream sandwich. This O/S is pretty slick. My husband, who regularly mentions my ‘inferior’ phone, is even entranced by it. He is an iPhone user of course. The size of the phone is bigger than a lot of them, but not so large that it feels uncomfortable. If you are ready for an upgrade, this phone is available on all of the major carriers. It is definitely worth a look.