I have completed week seventeen of studying for my MCSE exams. I continued the Live Learning course for exam 70-462 (Administering Microsoft SQL Server 2012 Databases), and finished Chapter 8 in the Learn PowerShell in a Month of Lunches book.
Cool Stuff
The coolest thing I learned this week was how to use the Get-Member cmdlet in PowerShell to find out what properties are passed through the pipeline. It was a very helpful concept to learn, and I have already managed to put it to use at work this week. Specifically, I was looking for an easy way to display the Wi-Fi MAC addresses on a group of computers. Using Get-Member, I was able to put together this little one-liner to do the job:
Invoke-Command -ComputerName Laptop1,Laptop2 -ScriptBlock {Get-NetAdapter -Name WiFi} | Format-Table -Property PSComputerName,Name,MacAddress
It would have worked too, except I was trying to use it on a group of Windows 7 computers, which don't support the Get-NetAdapter cmdlet. Oh well, I might just have to do it the old fashioned way for now.
PowerShell cmdlet of the Week
This week's cmdlet is going to be another simple one:
Get-Date
I learned about this one in the Learn PowerShell in A Month of Lunches book when learning about the Get-Member cmdlet. I discovered that one of the properties it contains is DayofYear. This is especially handy for me, as I have to do a calculation several times a month, and one of the pieces of data required is the day of the year. I used this one-liner to display the current day of the year:
Get-Date | Select-Object -Property DayofYear | Format-Table -AutoSize
or, you could shorten it down like this:
Get-Date | Select DayofYear | ft -A
Stats
Total time studying: 7 hrs.
- PowerShell: 1 hr.
- 70-462: 6 hrs.
Resources used:
In Closing
This past week has been a little weak (read: non-existent) on the 70-410 studying, but it has been a great week for PowerShell! I am going to re-set my goal of finishing Chapter 7 in the 70-410 study guide, and complete Chapters 9 & 10 in the Learn PowerShell in A Month of Lunches.
Onward and upwards in our never-ending quest for more bandwidth...er...I mean...knowledge.
Have a great week everyone!
In Closing
This past week has been a little weak (read: non-existent) on the 70-410 studying, but it has been a great week for PowerShell! I am going to re-set my goal of finishing Chapter 7 in the 70-410 study guide, and complete Chapters 9 & 10 in the Learn PowerShell in A Month of Lunches.
Onward and upwards in our never-ending quest for more bandwidth...er...I mean...knowledge.
Have a great week everyone!
No comments:
Post a Comment