PowerShell for Windows Admins:

Powershell


November 20, 2015  10:45 AM

Creating Registry Key

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

I had a question left on the blog asking how to create a registry key. My preferred method is to use the CIM class = StdRegProv. Its a static class so you don’t need to create an object [uint32]$hklm = 2147483650 $newkey = 'SOFTWARE\NewKey' Invoke-CimMethod -ClassName StdRegProv...

November 20, 2015  4:13 AM

PowerShell column

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The first in a regular(ish) series of articles has been published on the TechNet UK Blog. http://blogs.technet.com/b/uktechnet/archive/2015/11/20/why-you-need-to-learn-powershell.aspx Covering all things PowerShell related the articles will be appearing every 3-4 weeks.


November 19, 2015  2:49 PM

Splatting and Default parameters

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

One thing you don’t hear much about is default parameters. Consider this Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DeviceId = 'C:'" A pretty standard use of CIM. Now think if you have to do this across a number of machines on a regular basis. Typing could get a bit...


November 18, 2015  8:10 AM

Out of Process

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

One thing I’ve been seeing come up a lot recently is the problem of modules and cmdlets cot being available when jobs and workflows are executed even though the module has been specifically loaded into PowerShell. This is because workflows and Jobs run in a separate process when you execute...


November 16, 2015  12:51 PM

Accessing WMI

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, WMI

There are 3 sets of cmdlets for working with WMI classes – the WMI cmdlets, the WSMAN cmdlets and the CIM cmdlets. The protocols used by these 3 sets are different. The WMI cmdlets introduced in PowerShell 1 & 2 use DCOM for local and remote access under all circumstances The WSMAN...


November 14, 2015  12:51 PM

PowerShell + DevOps Global Summit 2016 – the agenda

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

We've finalised the agenda and we're starting to publish session information on the web site at https://eventloom.com/event/login/PSNA16 There are a handful of sessions on the site at present. The rest will be added over the next week or so. Keep checking back to see who's been...


November 11, 2015  2:00 PM

WMI wildcards and filtering

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, Powershell, WMI

A question on the forum asking about filtering WMI results raises a number of interesting points. The user wanted to pass a computername and a filter term to pull product information from remote machines. I ended up with this $computername = $env:COMPUTERNAME $filter = 'Live' $scriptblock...


November 6, 2015  1:48 PM

PowerShell in Action, 3e MEAP 2

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Books, Powershell

Another chapter of PowerShell in Action third edition has been released into the MEAP process. – see 0 Comments     RSS Feed     Email a friend


November 4, 2015  5:13 AM

WMI cmdlets and credentials

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, WMI

If you’re working with the WMI cmdlets and need to pass credentials you’ll end up with a statement something like this Get-WmiObject -Class Win32_ComputerSystem -ComputerName $computer -Credential $cred If the computer name defaults to the local host or you use . or ‘localhost’ as the...


October 30, 2015  11:37 AM

Creating DNS records

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
DNS, Powershell

Following on from my previous post about creating a reverse lookup zone in DNS here’s a function to create records in that zone. The function takes an IP address and name (of host) and uses Add-DnsServerResourceRecordA  to add the record to the forward lookup zone – I use my default AD...


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: