The PowerShell Summit is a community event. PowerShell.orh may organise it but we’re very aware that it is the PowerShell community’s event.
We’ve been planning the 2017 Summit for a while and we’ve reached a point in the process where we need your help.
What topics would you like to see covered at the 2017 Summit. We’ve published a request for topics at –http://powershell.org/request-for-topics/
Please let us know the topic areas you’d like covered and we can build that information into our agenda planning to ensure we have the Summit the community wants
If you want to incorporate the date in a file or folder name you can’t use Get-Date directly
01 June 2016 20:52:03
The simplest answer is to use the –Format or –Uformat parameters:
PS> Get-Date -Format yyyyMMdd
PS> Get-Date -UFormat %Y%m%d
If you have a collection of objects
$proc = get-process
you can get the number of members using the Length property
$proc is of type System.Array
IsPublic IsSerial Name BaseType
——– ——– —- ——–
True True Object System.Array
MSDN documenattion is at https://msdn.microsoft.com/en-us/library/system.array(v=vs.110).aspx
PowerShell also adds a Count property that is an alias of Length
if you are after the number of members in a collection via the pipeline you need to use the Measure-Object cmdlet
PS> $proc | Measure-Object
Count : 71
or measure directly
PS> Get-Process | Measure-Object
Count : 71
Notice that Measure-Object can also be used to discover other statistics – the Average, Sum, Maximum and Minimum. These only work for numeric properties.
This is worth a read
It discusses the evolution of Windows server and PowerShell. Read it in conjunction with the videos of Jeffrey Snover’s talks at WinOps and the European PowerShell conference this year.
Support for the WMF 5.0 preview is ending – https://blogs.msdn.microsoft.com/powershell/2016/05/23/end-of-support-for-windows-management-framework-wmf-5-0-production-preview-is-approaching-upgrade-to-rtm-bits/
Want to see what PowerShell 5.1 looks like?
Install Windows Server 2016 TP 5 or get on the fast ring for Windows 10 Insider Previews. The latest build – 14352 shows a PowerShell version of 5.1.14352.1002 with Powershell 1.0 through 5.0 as compatible versions
The WSMAN stack is still version 3.0 so no issues with remoting or CIM sessions between PowerShell 3.0, 4.0, 5.0 and 5.1
PowerShell 2.0 will have the CIM session issue as it uses WSMAN stack 2.0 and PowerShell 1.0 didn’t have remoting
The slides and code from my WinOps 2016 talk can be found here:
After rebuilding my test machine for Server 2016 (with mixed results) I needed to add a DHCP scope to the environment. I blogged about the DHCP PowerShell module several years ago.
To quickly add a DHCP scope to the current server
Add-DhcpServerv4Scope -Name ‘Manticore Scope’ `
-StartRange 10.10.54.2 -EndRange 10.10.54.30 `
-Description ‘Scope for Manticore domain’ `
-Type DHCP -State Active -SubnetMask 255.255.255.0 `
-LeaseDuration (New-TimeSpan -Days 2)
Set-DhcpServerv4OptionValue -ScopeId 10.10.54.0 -DnsServer 10.10.54.201
I’ll save this as I’ll have to rebuild the machine when Windows 2016 RTM’s and possibly again if I can’t get the wireless adapter to work then.
Having finished the current round of conference speaking I needed to upgrade my system to Windows 2016 TP5. I’m using a 6 year old Lenovo W510 system.
First problem is that I couldn’t get the wireless adapter working – after a lot of searching I saw a post with a similar issue due to the Wireless LAN Service which you need doesn’t install correctly. Server Manager and Get-WindowsFeature both show it as installed but the wlansvc service isn’t available – doesn’t show in in the services GUI or through Get-Service.
Telephone activation is a pain but works BUT if an internet activation fails you don’t get the telephone option.
saved the day.
Basically type SLUI 4 in the run dialog to open the manual activation dialog.
Hope this is fixed for RTM otherwise I’ll need a new machine.
During the WinOps conference – http://winops.org/ – I attended a session on DevOps culture. At one point the discussion got on to skill sets.
I introduced the concept of the Y shaped skillset.
You should have a deep understanding on at least one area – C# development, Active Directory, web development, Exchange management – whatever it is you should a ‘go to’ person for that area. That’s represented by the down stroke of the Y
In addition in a devops world you ideally need a bunch of skills that span the devops range. At the top you should have a broad understanding across the range of skills – at least enough to have sensible conversations with other practitioners. Those skills can be backed up with a few areas that complement your main skill as you drop deeper into the Y.
Over time you may see your main skill set change and what was your primary skill migrate into a secondary area to be replaced by something else.
Next time you’re wondering what to learn – think of this model and think about what skills you need to add to complement and build on your current skill set