PowerShell for Windows Admins:

Powershell


July 17, 2015  12:37 PM

get-computerDN–dealing with non-existant computers

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

If you look at the working part of the code to discover the distinguished name of a computer:   £> $computer = 'w12r2sus' £> $filter = “(&(objectCategory=computer)(objectClass=computer)(cn=$computer))” £>...

July 16, 2015  12:47 PM

get-computerDN function

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

Last time I showed a bare bones function for using [adsisearcher] to retrieve the distinguished name of a domain computer. This is a somewhat expanded version of that function which adds in the sorts of features you’d want for a production ready function. function get-computerDN...


July 15, 2015  1:54 PM

ADSIsearcher returns

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory, Powershell

I’ve been using the Microsoft AD cmdlets (and before that the Quest cmdlets) for so long that I’d sort of forgotten about [adsisearcher]. It was introduced in PowerShell 2.0 and is a shortcut for System.DirectoryServices.DirectorySearcher A question in the forum about using this remotely...


July 14, 2015  12:05 PM

Disk identification

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell, WMI

A recent question on the forums regarded using the Win32_LogicalDisk class to retrieve disk size and free space data.  A filter based on the disk letter was being used. The main error with the code was that the filter was being expressed as "DeviceId='E'" rather than "DeviceId='E:" The...


July 11, 2015  4:36 AM

PowerShell and messaging

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Messaging, MSMQ, Powershell, Windows Server 2012 R2

This article - http://powershell.org/wp/2015/07/07/rabbitmq-and-powershell/ – reminded me that Windows server comes with a built-in messaging...


July 8, 2015  7:32 AM

PowerShell Gallery taking registrations

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The PowerShell team have just announced that the PowerShell gallery is now open for YOU to post your module. You need to register to be able to post code to the gallery.

    0 Comments     RSS Feed     Email a friend


July 7, 2015  11:05 AM

DSC validation

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

The PowerShell team are asking for validation and feedback on the DSC features in WMF 5.0 -

    0 Comments     RSS Feed     Email a friend


July 7, 2015  5:47 AM

Number of working days

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Need to know the number of working days left until a specific date?   $we = [System.DayOfWeek]::Saturday, [System.DayOfWeek]::Sunday $date = Get-Date -Year 2015 -Month 8 -Day 28 $now = (Get-Date).AddDays(-1) $workdays = 0 while ($now -le $date){ $now = $now.AddDays(1) if...


July 5, 2015  8:09 AM

Scripting Guy new series

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Ed Wilson, the Scripting Guy, is starting a new series of posts on writing PowerShell scripts – he’ll also cover what to script, when to script and when to work interactively. First post is here

    0 Comments     RSS Feed     Email a friend


July 4, 2015  5:21 AM

Scripting Games July 2015 puzzle

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Powershell

Head over to http://powershell.org/wp/2015/07/04/2015-july-scripting-games-puzzle/ for our inaugural Scripting Games puzzle. I’ll...


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: