Skip to main content

Posts

What do Parenthesis do in PowerShell?

Depending on where you are using them, parenthesis can be used for several different functions. In Math If you remember back in algebra class, we used parenthesis to change the order of processing a math equation.  Normally multiplication and division is performed before addition and subtraction PS C:\> 5+6*10 65 Add some parenthesis, and you change the order of processing. PS C:\> (5+6)*10 110   In Cmdlets We can use parenthesis in cmdlets to force other cmdlets to run first.  In this example, we have a text file called Names.txt .  It contains the names of three computers.  Using the cmdlet Get-Content we can see these names. PS C:\psworks> Get-Content names.txt TechTour-CL1 TechTour-DC1 Tech-ex1 Now we are going to ask for the BIOS information from each of these clients.  there are two ways to do this.  The long way is where we specify each computer name one at a time. PS C:\psworks> Get-WmiObject Win32_Bios -ComputerNam...

Getting Ready for SMB Nation Emerging Technology Tour

This morning I’m sitting in the Munich airport waiting for my 10+ hour flight over the pond.  It is going to be a very long day.  I’m wrapping up my slides for my two presentations.  If you are planning on attending, don’t forget your laptop.  I’ll be doing demonstrations in which I will invite you to follow along. Silicon Valley, January 31 Dallas Texas, February 7 Toronto Ontario, March 7  

SMB Nation Emerging Technology Tour

I am pleased to announce that I’ll be speaking about PowerShell on the Emerging Technology Tour with SMB Nation.  I’ll be speaking on the tour on these dates and locations: Silicon Valley, January 31 Dallas Texas, February 7 Toronto Ontario, March 7 David Shackelford will be presenting Migrating your SBS Exchange to Exchange 2013 . Karl Palachuk will be presenting Standards and Procedures That Will Increase Your Profits . I’ll be delivering two separate two hours segments.  The morning session will focus on the basics of what PowerShell is and how to learn it.  The afternoon session will focus on actually using it to manage your environment.  In both sessions, I invite you to bring a laptop with PowerShell Version 2, 3, or 4 installed on it so you can follow along and learn hands on. Registration is open!

Use PowerShell to Look for Viruses

I’m sitting in the USO at the San Jose airport this evening waiting on a flight back home.  A good friend and Shipmate of mine contacted me with a bit of a virus issue.  He needed a way to scan all of his clients for this bad bug.  He unfortunately did not have access to his organizations central antivirus system. After a bit of online research, I found what I was looking for.  Either files or registry keys that would mark a potential infection.  I wrote up some code and sent it over to him.  Yes, I could have wrote code very quickly that focused only the little critter running around his network, but what fun would that be.  This code is reusable. The cmdlet is Search-VirusSignature.  I included a help file to show you how to use it.  It does require access to the Active Directory module and also for all of your clients to have PowerShell Remoting turned on. Happy Hunting! Function   Search-VirusSignature { [ cmdletbinding ...