Author Archives: richardsiddaway

PowerShell Deep Dive–MEAP now complete

The final chapters of PowerShell Deep Dive have been added to the MEAP http://www.manning.com/hicks/ Enjoy

Posted in Books, PowerShell V3 | Leave a comment

AD Month of Lunches–Chapter 11 in MEAP

The MEAP for AD Management in a Month of Lunches has been extended with the inclusion of chapter 11 – Creating Domain Controllers. http://www.manning.com/siddaway3 Enjoy

Posted in Active Directory, Books, PowerShell and Active Directory | Leave a comment

Scripting Games – Filter early again

Grading the scripts in Event 4 and the one thing that jumps out is the amount of unnecessary data being carried through the scripts You were asked for 7 properties off 20 random users Get-ADUser has a –properties parameter. USE … Continue reading

Posted in Powershell, PowerShell and Active Directory, Scripting Games | Leave a comment

Scripting Games – Win32_LogicalDisk or Win32_Volume

I have heard some discussions recently regarding whether Win32_LogicalDisk or Win32_Volume should be used in the answer to event 3 in the Scripting Games. The problem requires you pull the drive letter, drive size and freespace for local disks on … Continue reading

Posted in Powershell, PowerShell and WMI, Scripting Games | Leave a comment

Scripting Games-Subfunctions

One of the principles of writing scripts (or any code) is the KISS principle – Keep It Simple Scripter. That principle is being abused al lot in event 3 I am seeing numerous entries that define an advanced function as … Continue reading

Posted in Powershell, Scripting Games | Leave a comment

Scripting Games–filtering on remote server

In event 3 you have to get information on hard disk capacity.  I’ve only looked at the first couple of dozen scripts but seen this too many times Get-WmiObject -Class Win32_LogicalDisk | where DriveType -eq 3 or if you prefer … Continue reading

Posted in Powershell, PowerShell and WMI, Scripting Games | Leave a comment

Scripting games–ErrorActionPreference

I’ve seen a lot of this type of thing in events 1 and 2 $ErrorPref = $ErrorActionPreference$ErrorActionPreference = “Stop”   Don’t The default for $ErrorActionPreference is Continue.  This means that the error message is shown and the cmdlet attempts to … Continue reading

Posted in Powershell, Scripting Games | Leave a comment

Scripting Games–making work

I saw this in one of the submissions: $Properties = @{} $Properties['Computer'] = $SystemInfo.__SERVER $Properties['OperatingSystem'] = “$($OSInfo.Caption) – $($OSInfo.CSDVersion)” $Properties['PhysicalMemory'] = $SystemInfo.TotalPhysicalMemory   My immediate thought was the entrant likes making work for themselves. The hash table can be created in … Continue reading

Posted in Powershell, Scripting Games | Leave a comment

AD MoL Chapter 10 MEAP

Chapter 10 of AD Management in a Month of Lunches is now available. http://www.manning.com/siddaway3/ The chapter covers Fine Grained Password Policies

Posted in Active Directory, Books, PowerShell V3 | Leave a comment

Scripting Games–new Get-ChildItem parameters

One improvement that came with PowerShell v3 is the –File and –Directory parameters on Get-ChildItem If I run this Get-ChildItem -Path c:\mydata I will get a mixture of directories and files Mode                LastWriteTime     Length Name—-                ————-     —— —-d—-        19/11/2012     20:19            … Continue reading

Posted in PowerShell V3, Scripting Games | 3 Comments