header image

Archive for March, 2012

Manning have PowerShell in Practice on a half price offer today. Go to www.manning.com and use code dotd0330cc when ordering

under: Books, PowerShell and Active Directory, PowerShell and Exchange 2007, PowerShell and IIS, PowerShell and SQL Server, PowerShell and WMI, PowerShell original

  The recording, slides and demo script from the session on CIM cmdlets – Tuesday 27 March is available https://skydrive.live.com/?cid=43cfa46a74cf3e96#cid=43CFA46A74CF3E96&id=43CFA46A74CF3E96%212955 Enjoy

under: PowerShell and WMI, PowerShell User Group, PowerShell V3

The agenda for the PowerShell Deep Dive next month has just been published on the PowerShell team blog http://blogs.msdn.com/b/powershell/archive/2012/03/26/schedule-for-the-upcoming-powershell-deep-dive-and-a-few-videos-from-frankfurt.aspx If you are already booked to go – looking forward to meeting you.  If you’re thinking of going last years event was amazing. If you are interested in PowerShell it is the place to be

under: Deep Dive, PowerShell V3, PowerShellV2

A question on the forum about the default properties returned by Get-ADUser started me thinking about the differences between the Microsoft cmdlets and the Quest cmdlets. So for starters the default display: Get-ADUser richard Get-QADUser richard Get-AdUser Get-QADUser DistinguishedName DN Enabled   GivenName   Name Name ObjectClass Type ObjectGUID   SamAccountName   SID   Surname […]

under: PowerShell and Active Directory

Quick reminder that the UK user group meeting is on Tuesday 27 March @ 7.30 BST.  Details from http://msmvps.com/blogs/richardsiddaway/archive/2012/03/06/uk-powershell-group-march-2012.aspx   The meeting is on the new CIM functionality in PowerShell v3.  This is a need to know technology as much of the new PowerShell functionality in Windows Server 8 is based on this. Please double […]

under: PowerShell and WMI, PowerShell User Group, PowerShell V3

Updating AD users in bulk

Posted by: | March 22, 2012 | 1 Comment |

A question was raised on the forums about bulk updated of user information.  This is an example of how to handle it A CSV file was created Import-Csv -Path "C:\Scripts\AD Examples\Users\bulkchangetest.csv" | Format-Table –AutoSize   userid JobTitle  Cost Center HireDate       —— ——–  ———– ——–       usera  JobTitleA 1001001     1 January 2011 userb  JobTitleB 1001002     1 February […]

under: PowerShell and Active Directory

I heard at the beginning of the week that I’ve been granted a speaker slot at the PowerShell Deep Dive next month – http://www.theexpertsconference.com/us/2012/ I’ll be speaking on creating cmdlets from WMI objects using a new feature in PowerShell v3 that is so cool it could start a new Ice Age Look forward to seeing […]

under: Deep Dive, PowerShell V3

Folder sizes

Posted by: | March 21, 2012 | No Comment |

Question on the forums related to folder sizes and last write time Get-ChildItem -Path "C:\PersonalData\MyBooks\PowerShell and WMI" -Recurse | where { $_.PSIsContainer} | foreach { $size = Get-ChildItem -Path $_.FullName | measure -Sum Length | select -ExpandProperty Sum Add-Member -InputObject $($_) -MemberType NoteProperty -Name Size -Value $size $_ | select Fullname, LastWriteTime, @{N="Size(MB)"; E={[math]::Round(($_.Size/1mb), 2)}} […]

under: File System

In the last post which looked at finding user accounts that had been deleted I had this syntax for the Microsoft cmdlets Get-ADObject -Filter {isDeleted -eq $true -and name -ne "Deleted Objects" } -IncludeDeletedObjects | Format-List Name, Distinguishedname   This had a mistake that I missed. It will return all deleted objects.  The syntax should […]

under: PowerShell and Active Directory

Deleted user accounts

Posted by: | March 20, 2012 | No Comment |

User accounts get deleted – sometimes on purpose and sometimes its more of a…  oops You can find accounts that have been deleted like this "`nMicrosoft" Get-ADObject -Filter {isDeleted -eq $true -and name -ne "Deleted Objects" } -IncludeDeletedObjects | Format-List Name, Distinguishedname "`nQuest" Get-QADUser -Tombstone -SizeLimit 3000 | Format-Table Name, DN -AutoSize "`nScript" $data = […]

under: PowerShell and Active Directory

Older Posts »