PowerShell for Windows Admins:

Powershell


October 25, 2017  5:32 AM

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell

A question on the forum about getting monitor resolution led to this code

Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorId |
foreach {
 
 $filter = ("InstanceName = '$($psitem.InstanceName)'").Replace("`\", "`\`\")
 
 $maxres = Get-CimInstance -Namespace root\wmi -ClassName...

October 24, 2017  2:17 PM

PowerShell + DevOps Summit 2018 schedule

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The schedule for the 2018 Summit still needs a little bit of polishing to finish it but it's taking shape. I've started releasing information on sched.com that we're using for all our scheduling needs for the Summit. The one and only truth regarding the sessions and their times can be found at 


October 24, 2017  1:32 PM

PowerShell v6: #1 major differences

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

In August 2016 PowerShell went open source. Since then we’ve seen 18 releases of alpha code and 8 beta release with another beta release imminent. This post - https://blogs.msdn.microsoft.com/powershell/2017/07/14/powershell-6-0-roadmap-coreclr-backwards-compatibility-and-more/ – from the...


October 5, 2017  4:10 AM

Use CIM cmdlets not WMI cmdlets

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

WMI and CIM seem to cause a LOT of confusion. Its really simple. CIM is an industry standard from DMTF.org. WMI was Microsoft’s implementation of CIM way back in Windows NT days. The complication is that Microsoft had a set of WMI cmdlets in PowerShell v2. In PowerShell v3 they introduced a set...


October 1, 2017  9:06 AM

PowerShell templating systems

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Code reuse is a big plus when you’re developing lots of scripts. The ability to create templates for your code can also save you lots of time – for instance when advanced functions first appeared I create myself a template the included all of the validation checks, the code to switch...


September 30, 2017  3:30 PM

PowerShell Trim

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell Trim – no its not a new slimming fad. Trimming is the act of removing characters – usually white space – from the beginning or end of a string. You have three methods on the String class you can use Trim TrimEnd TrimStart PS> $str = " abcdefghijk " PS>...


September 30, 2017  1:45 PM

PowerShell editors

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

PowerShell works great when you use it interactive;y but at some point you’re likely to want to write substantial pieces of code – scripts or functions – for which you’ll need an editor. This is my take on PowerShell editors. There are PowerShell add-ins for Visual Studio – one of...


September 30, 2017  9:20 AM

Call for topics closing 1 October

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The call for topics is closing 1 October at 23:59 GMT. We’ve had a fantastic set of submissions. Creating an agenda for the 2018 Summit is going to be very difficult because we’ve had so many fantastic sessions submitted and I don’t have enough slots to  take them all. The call for topics...


September 30, 2017  9:10 AM

DSC–the future?

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

I was incredibly excited when I first saw DSC – it was in April 2013 as a special MVP only preview at the first PowerShell Summit – as a work in progress. Since that time my excitement has waned to the point that I now ask DSC – the future? Looking at the PowerShell Team announcement...


September 29, 2017  4:00 PM

PowerShell comments

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Putting comments into your code has been a long established practice – this is how you do PowerShell comments A single line comment is indicated by the # symbol # This is a comment Get-Process You can put a comment at the end of a line but not in the middle. Once you’ve added a...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: