PowerShell video posted

23 05 2007

 

 

News

I found out today from /\/\o\/\/’s The PowerShell Guy blog (fantastic blog) that there is a new Channel 9 video called: Windows PowerShell: Origin and Future with Bruce Payette and Jeffery Snover.

 I’m hoping to have the next podcast posted on Thursday.





Episode 3 – Select, Set, Measure

15 05 2007

A podcast about Windows PowerShell.

News

  • Quest Software has released some beta cmdlets for managing Active Directory
  • PowerShell Analyzer RC1 has been released

In this show I discussed the cmdlets:

  • Select-String
  • Set-Content
  • Measure-Command

 

Resources:

PowerShell newsgroup

Quest Software’s PowerShell cmdlets for AD management

Tips:

 

  • Quoting rules
  • Double quotes – variables are expanded and can contain text right after it

 

  • Uses of backtick or backquote `
    • Escapes the next character
    • Example “`$user is $user”
    • Can be used to continue to the next line
    • `n is newline
    • `r is a carriage return
    • `t is a tab
    • `a is an alert
    • `b is a backspace
    • `’ or `”
    • `0 is null
    • “ is a single backtick

 

  • Singe quotes “What you see is what you get”even escape characters are ignored

 

 

PowerShell moment:

  • I talked about creating 150 user accounts with the new Quest cmdlets
  • I talked about doing a mass Group Policy update using PowerShell to update the gpttmpl.inf files

One Liner:

 





Episode 2 – Filtering Cmdlets

20 04 2007

A podcast about Windows PowerShell.

News

  • Windows Powershell will ship with Longhorn and will be available in Beta 3

In this show I discussed the cmdlets:

  • Where-Object
  • Sort-Object
  • ForEach-Object

 

Resources:

PowerShell Analyzer

An Introduction to Microsoft PowerShell -by Don Jones

Tips:

  • Gettype()
  • Learn Aliases
    • Get-Alias

One Liner:

Select-String *.txt -pattern username | %{$_.line} | set-content username.log

 





Episode 1 – Fundamental Cmdlets

26 03 2007

A podcast about Windows PowerShell.

In this show I discussed the cmdlets Get-Command, Get-Help and Get-Member.

Here is a great video discussion of these cmdlets by Jeffrey Snover.

I also talked about a great Technet video by Don Jones about the PowerShell Pipeline.

For our first PowerShell moment I talked about $f= dir

The one-liner (full version) is:

Get-Content servers.txt | %{$x = net time \\$_; $x[0];If($x[2].contains(”Local”)){$x[2]}} | Add-Content Servertime.txt

You can find more detail about this one-liner in an earlier post.





Episode 0 – Episode Zero

15 03 2007

I have finally posted my first podcast!

I started with Episode Zero because all collections in Powershell start with zero. This show is an introduction to the podcast, PowerShell and to scripting. I gave an overview of the segments that will be featured in upcoming podcasts as well as my reasoning behind them.

You can find the Windows PowerShell homepage at http://microsoft.com/powershell.

PowerShell Help 1.1 can be downloaded from http://www.primalscript.com/freetools/defaultin.asp.

I hope you enjoy my first attempt at podcasting. If the link at the right doesn’t work for you to subscribe you can go directly to http://feeds.feedburner.com/Powerscripting and click one of the links or paste the URL in your podcatching software.





Powershell one-liner to check the time on a bunch of servers for DST

9 03 2007

Over the weekend I need to check a bunch of servers (mostly Domain Controllers) to see if the DST (Daylight Savings Time) change occurs correctly.  I decided to see how I could do it in Powershell and this is what I came up with: 

Get-Content servers.txt | %{$x = net time \\$_; $x[0];If($x[2].contains(“Local”)){$x[2]}} | Add-Content Servertime.txt

This is a line of Powershell code that will open servers.txt (which is just a list of servers) and for each server it will run the “net time” command.  I pass the first line of the output of the “net time” command $x[0] and check to see if the third line contains “Local”.  If it does I pass that line as well ( to see the local time on the servers that are not in my timezone.)  I then send this to Servername.txt

Quick, easy one line of code.  You’ve gotta love Powershell!  Thanks Microsoft





AAArrghhh!!

23 02 2007

I had an equipment setback. The USB mixer I bought is going back. It was an Alesis MultiMix USB 8 and I was getting some kind of a ground loop when I tried to use the USB interface and monitor from the mixer. I’m not the only one who has had this problem. I ordered a new mixer today and I should have it early next week.





Podcasting gear is on the way

7 02 2007

I’m another step closer today to Episode 1.  I ordered my mixer, mic etc. today.  I should have it in my eager little hands on Friday!





Coming Soon!

7 02 2007

This is the blog of the forthcoming PowerScripting Podcast.  This podcast will be about scripting for Windows IT Pros and focus on Windows Powershell.  Stay tuned for updates!








Design a site like this with WordPress.com
Get started