PowerShell Helped Me

My PowerShell Story

  • Home
  • About Me
  • ConfigMgr

Don Jones Provides Powershell Learnings.

Posted by tbirdbrent on July 11, 2014
Posted in: Powershell, Powershell.org, Videos. Leave a comment

This video’s were done part of the pre-con show before the Powershell Summit 2014.
Part 1

Part 2

The Powershell Summit 2015 will be in Charlotte NC. I believe April 20,21,22 2015.

Powershell.org

Don Jones Youtube Channel

PodCast posted episode 275

Posted by tbirdbrent on July 3, 2014
Posted in: PodCast, Powershell, Powershell.org. Leave a comment

I do listen to podcast who doesn’t!  Anyway here is the latest episode

Episode 275 – PowerScripting Podcast – PowerShell MVP Steve Murawski

by Jonathan Walz

You can go to this link for the show notes.

The guys at PowerShell.org create this podcast

New section added to the Website.

Posted by tbirdbrent on May 27, 2014
Posted in: configmgr. Tagged: 2012, Configmgr, migration, r2, sccm, User state. Leave a comment

So today I have added a new section (Page) to the website.  This section will cover Configuration Manager 2012 R2.  Basically I’m very new to Config-Mgr.  I would like to post everything I can of what I would do with SCCM there.  I will post Step-By-Steps that I have created and Step-By-Steps that I have found on the internet.  So I hope all everyone will find this very useful.

To start of the new section here is the first walk-through

Step-By-Step  User State Migration Sccm 2012 R2

SCCM 2012 SP1 – Install Windows 7 to drive letter C:

Posted by tbirdbrent on May 27, 2014
Posted in: Uncategorized. Leave a comment

Found this post to resolve the issue I was having, when deploying an operating system the OS would always install to the D: drive. Great post on fixing this issue.

PowerShell PodCast

Posted by tbirdbrent on May 17, 2014
Posted in: PodCast, Uncategorized. Tagged: PodCast, Powershell, Powershell.org. Leave a comment

I do listen to podcast who doesn’t!  Anyway here is the latest episode

Episode 269 – PowerScripting Podcast – U.S. PowerShell Summit Recap

by Jonathan Walz

You can go to this link for the show notes.

The guys at PowerShell.org create this podcast

TechEd North America 2014 Session Videos.

Posted by tbirdbrent on May 17, 2014
Posted in: TechEd, Videos. Tagged: Don Jones, Jeffrey Snover, TechEd, Videos. Leave a comment

So I was not able to get to TechEd this year.  TechEd was in Houston Texas this year.  But with technology TechEd can come to you.  So I have gathered some of the sessions from PowerShell.

 

Windows PowerShell Unplugged with Jeffrey Snover

Jeffrey Snover was the presenter

A Practical Overview of Desired State Configuration

Don Jones was the presenter

Windows PowerShell Best Practices and Patterns: Time to Get Serious

Don Jones was the presenter

 

Powershell tip! = = Get that Version.

Posted by tbirdbrent on April 7, 2014
Posted in: Uncategorized. Tagged: Powershell. Leave a comment

Powershell tip! = = Get that Version. Today I needed to get a version number of some software on a couple of pc’s. This can be done with out using powershell, and you might even be asking “Brent why use Powershell in the first place?” Well we can get the data that we need and not use Powershell. To reach my goal, there are two ways. The first way, would be going to Add or Remove Programs. The second way would be finding the excutable file on our HDD’s, then right click on that file and navigate to the details tab. Here we would find the version of our software.

But in Powershell, we are much more flexable in getting to our goal. The first code that we will use for getting to our goal is

  	Dir -Recurse | where {$_.name -like "*Notepad*"}
 
 

What this command does, is searches your c:\ directory for a word that is like (anything in the inside “”s). Lets test this out. Open Powershell, (Windows 7= clickt he start button, type in the search box powershell and hit enter.) So you can copy the code from above or type it out.
You will notice that you get a lot in return. But we don’t need all this. So lets narrow down our results. Lets use the following code.

	
  	Dir c:\windows\system32 -Recurse | where {$_.name -eq "notepad.exe"}
    
   

The result should look like the following.

	
  	PS C:\scripts> Dir c:\windows\system32 -Recurse | where {$_.name -eq "notepad.exe"}  
    
		Directory: C:\windows\system32

		Mode            LastWriteTime   		Length Name                                                                                                                                         
		----            -------------     		------ ----
		-a---        07/25/2012  11:08 PM      		 243712 notepad.exe
  	
 

But if you notice we still dont have our version number. If you know some Powershell basics, you would follow the code with a piped cmdlet | get-member or | gm for short.
What this will show us are all of the properties that we can parse throw. Notice that there is a property called “VersionInfo” mmmm wonder what that will give us. Well lets give it a go.

  PS C:\scripts> dir c:\windows\system32 -Recurse | where {$_.name -eq "notepad.exe"} | fl versioninfo

  VersionInfo :
    File:             C:\windows\system32\notepad.exe
    InternalName:     Notepad
    OriginalFilename: NOTEPAD.EXE.MUI
    FileVersion:      6.2.9200.16384 (win8_rtm.120725-1247)
    FileDescription:  Notepad
    Product:          Microsoft® Windows® Operating System
    ProductVersion:   6.2.9200.16384
    Debug:            False
    Patched:          False
    PreRelease:       False
    PrivateBuild:     False
    SpecialBuild:     False
    Language:         English (United States)
    	
    

Ok this is good. I’m seeing that there is a value labeled

      "FileVersion:      6.2.9200.16384 (win8_rtm.120725-1247)"
      
    

Ok we got to our goal. We go the version number of the software we are looking for.

But do we need all that data. We just wanted the Version number right. Here I well show you another Powershell code that will just retrieve the data we want.

    PS C:\scripts> (get-item -Path c:\windows\system32\notepad.exe).VersionInfo.fileversion
    6.2.9200.16384 (win8_rtm.120725-1247)
      
    

What do you think. Nice and quick, clean and to the point. now that we can get this data, we can branch out and do this for multiple pc’s and at the same time. I will touch on that in a later tip.

Posts navigation

  • tbirdbrent

    tbirdbrent

    View Full Profile →

  • Recent Posts

    • Don Jones Provides Powershell Learnings.
    • PodCast posted episode 275
    • New section added to the Website.
    • SCCM 2012 SP1 – Install Windows 7 to drive letter C:
    • PowerShell PodCast
  • Recent Comments

  • Archives

    • July 2014
    • May 2014
    • April 2014
  • Categories

    • configmgr
    • PodCast
    • Powershell
    • Powershell.org
    • TechEd
    • Uncategorized
    • Videos
  • Meta

    • Create account
    • Log in
    • Entries feed
    • Comments feed
    • WordPress.com
Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Subscribe Subscribed
    • PowerShell Helped Me
    • Already have a WordPress.com account? Log in now.
    • PowerShell Helped Me
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
Design a site like this with WordPress.com
Get started