PowerShell (v3) in a Year - Day 5: Get-Item
After hitting two long about_ topics back to back ( and ) I decided to randomly grab another: Get-Item. Get-Item is actually a useful cmdlet. Unlike Get-Content, which we will cover later, Get-Item,...
View ArticlePowerShell (v3) in a Year - Day 6: about_Arrays
Arrays are one of the most basic data structures used in PowerShell used for storing elements. More specifically, arrays are reference type objects used to store collections of elements of the same...
View ArticlePowerShell (v3) in a Year - Day 7: about_If
about_If is a bit of a softball, but, I figured, hey, it needs to be covered. In fact, all of the logic constructs need to be touched on. This just happened to catch my eye today. As I was reading in a...
View ArticlePowerShell (v2/v3) - Testing to see if a Folder (or File) Exists
These are mainly for me to jot down as reminders for myself. If I want to determine if file system object is a file (leaf) or folder (directory) I can use these two tests:Test folder:...
View ArticlePowerShell (v3) - Using Visio to Display Cmdlets by Noun
To get a better grip on what all exists in the new v3 command space, I wanted to know what I could do with the Get-Command cmdlet in order to get things grouped by Noun. If this is unfamiliar to you,...
View ArticleWindows 2012 Server - Burn to USB
I am not a hardware guy. At all. For me, the on button is pushing the boundaries of things. So, to reinstall an OS is kind of tipping my toes into waters I am less than excited about. At this point, I...
View ArticlePowerShell (v3) - Get a Numbered List of Cmdlets
Nothing special. Just a quick way to get a list of cmdlets available to a shell. Great for reference when you want a controlled, order list of...
View ArticlePowerShell (v3) in a Year - Day 8: about_Split
I did not discover the Split operator for far too long in my workings with PowerShell. I had used similar things in Javascript, C#, Perl and VBScript, but, didn't know about this one. Man, was I...
View ArticlePowerShell (v3) in a Year - Day 9: about_Execution_Policies
Execution policies, in many ways, are a throw away concept in PowerShell. Once you understand it, for most people, that's probably the last time you will need to think about it until you log onto a new...
View ArticlePowerShell (v3) - Type Accelerators Cheat (and a lot of Hot Wind)
This is straight off of Hal's Google+.[PSObject].Assembly.GetType('System.Management.Automation.TypeAccelerators')::Get.GetEnumerator() |sortkey|selectkey Now, to get a little more into the arcane side...
View ArticlePowerShell (v3) in a Year - Day 10: about_Data_Sections
Data sections are a PowerShell technique, included since version 2.0, which provides script writers with a powerful technique to separate out code from data. This approach to distinguishing between the...
View ArticlePowerShell (v3) in a Year - Day 10: about_Core_Commands
PowerShell introduced the concept of providers as a way to try and flatten access to data stores. Windows has access to a wide array of data stores, and, typically, each type of data store comes with...
View ArticlePowerShell (v3) in a Year - Day 11: Get-Item
Topic: Get-ItemAlias: giNote: I had already touched on the Get-Item cmdlet, but, felt there were a few items I had left out, so, I revisited it to complete the task. The original post is...
View ArticlePowerShell (v3) in a Year - Day 11: Get-Verb
Topic: Get-VerbAlias: None.A key design element of the PowerShell system built in to create an intuitive feel for the language is the Verb-Noun pattern used with cmdlet naming. For folks new to this...
View ArticlePowerShell (v3) in a Year - Day 11: Rename-Item
Topic: Rename-ItemAlias: ri, renIn cmd.exe the equivalent command to Rename-Item was simply ren. Nicely enough, ren still works as an alias for the Rename-Item cmdlet, but, there are a few more bells...
View ArticlePowerShell (v3) in a Year - Day 12: Get-Random
Get-Random was one of those cmdlets I knew about, but, had never really looked at. This is precisely why I wanted to do this "in a Year" exercise...it forces me to learn about things I thought I knew...
View ArticlePowerShell (v3) in a Year - Day 12: about_Line_Editing
Hardly a meaty topic, but, about_Line_Editing shows how to take full advantage of the keyboard when working inside the shell interface. Below are some of the simple commands for single character/word...
View ArticlePowerShell (v3) in a Year - Day 13: Clear-Content
Topic: Clear-ContentAlias: clcThe help for Clear-Content says, "Deletes the contents of an item, such as deleting the text from a file, but does not delete the item." Clear-Content is the antithesis of...
View ArticlePowerShell (v3) in a Year - Day 13: Clear-Host
Topic: Clear-HostAlias: cls, clearWhen working with the console host extensively, I find a need to wipe the slate clean from time to time. Clear-Host is the perfect cmdlet to do the job. When you call...
View ArticlePowerShell (v3) in a Year - Day 13: Add-Computer
Topic: Add-ComputerOne of those simple revelations I came to a few years back was that Windows machines exist in either one of two states: 1) as a workgroup member or 2) as a domain member. Not having...
View ArticlePowerShell (v3) in a Year - Day 14: Write-Warning
Having written my share of large, complex scripts, I find Write-Warning to be a tremendously useful cmdlet. As noted in the help, "The Write-Warning cmdlet writes a warning message to the Windows...
View ArticlePowerShell (v3) in a Year - Day 15: Resolve-Path
Topic: Resolve-PathPowerShell has two powerful name resolution engines when it comes to working with providers. In the spirit of traditional Windows file and folder naming wildcards have a long history...
View ArticlePowerShell (v3) in a Year - Day 15: Get-Host
Topic: Get-HostAlias: NoneOn the surface the cmdlet Get-Host could easily be mistaken for a simple .exe like hostname.exe (which returns the local machine name and resides in C:\Windows\System32 as...
View ArticlePowerShell - Add a Shutdown Button in Windows 8
Doug Finke spotted this one on Facebook and I thought it good to jot down for posterity. I have not really started working on 8/2012 extensively yet, so, I am not familiar with all the pending wars...
View ArticlePowerShell - ShowUI: Walkthrough
Another snapshot for a great read. Winforms was the dominant .NET approach for PowerShellers to create robust GUI's in Windows without relying on the older VBScript/shell models. As the Windows...
View Article
More Pages to Explore .....