-
Recent Posts
Archives
- May 2012 (26)
- April 2012 (21)
- March 2012 (65)
- February 2012 (94)
- January 2012 (54)
- December 2011 (17)
- November 2011 (11)
- October 2011 (15)
- September 2011 (39)
- August 2011 (57)
- July 2011 (58)
- June 2011 (65)
- May 2011 (53)
- April 2011 (25)
- March 2011 (12)
- February 2011 (18)
- January 2011 (27)
- December 2010 (2)
- November 2010 (14)
- October 2010 (13)
- September 2010 (1)
- June 2010 (11)
- May 2010 (31)
- April 2010 (29)
- March 2010 (19)
- February 2010 (31)
- January 2010 (28)
- December 2009 (11)
- November 2009 (40)
- October 2009 (2)
- September 2009 (8)
- August 2009 (21)
- July 2009 (21)
- June 2009 (27)
- May 2009 (32)
- April 2009 (24)
- March 2009 (41)
- February 2009 (42)
- January 2009 (34)
- December 2008 (30)
- November 2008 (40)
- October 2008 (42)
- September 2008 (52)
- August 2008 (40)
- July 2008 (35)
- June 2008 (38)
- May 2008 (29)
- April 2008 (32)
- March 2008 (59)
- February 2008 (43)
- January 2008 (47)
- December 2007 (30)
- November 2007 (62)
- October 2007 (54)
- September 2007 (43)
- August 2007 (44)
- July 2007 (55)
- June 2007 (57)
- May 2007 (55)
- April 2007 (43)
- March 2007 (61)
- February 2007 (50)
- January 2007 (21)
- December 2006 (7)
- November 2006 (16)
Categories
- .NET
- Active Directory
- Active Directory administration with PowerShell
- Architecture
- BITS
- Books
- COM
- Deep Dive
- DHCP
- DNS
- Events
- Exchange
- File system
- files
- Firewall
- General
- General IT matters
- IT Community
- IT Security
- Learning Powershell
- Math
- Microsoft
- Networking
- Office 2010
- Opinion
- Outlook
- Philosophy
- Powershell
- PowerShell and Active Directory
- PowerShell and Exchange 2007
- PowerShell and IIS
- PowerShell and SQL Server
- PowerShell and WMI
- Powershell Basics
- PowerShell User Group
- PowerShell V2
- PowerShell V3
- PSAM
- Rant
- Science Fiction
- Script of the Week
- Scripting
- SQL Server
- Strings
- Technology
- Uncategorized
- Virtualisation
- Walking
- Windows 7
- Windows 8
- Windows 8 Server
- Windows Server 2008
- Windows Server 2008 R2
- WPF
- WSH
Meta
Twitter
- Preparing for the next UG meeting - PowerShell in Server 2012 - too much to choose from 1 week ago
- Reading about regular expressions in #PowerShell . My head is exploding 1 week ago
- Sat in San Diego airport waiting to fly home after an awesome deep dive 3 weeks ago
- #PowerShell Deep Dive is over. Another awesome event. It's the only place I learn something from every session 3 weeks ago
- #PowerShell v3 jobs give many more options - results available across sessions in many cases 3 weeks ago
Monthly Archives: January 2012
Reading direct reports
As stated last time the direct reports is a backlink created from the users who have this particular user as a manager Displaying this attribute is straight forward if (-not (Get-Module ActiveDirectory)){ Import-Module ActiveDirectory } $ou = “OU=England,DC=Manticore,DC=org” $manager = … Continue reading
User organisation details
The organization tab on the user properties can hold a number of items – job title, department, company, manager & direct reports The first four we can set directly. The direct reports attribute is a backlink meaning it is filled … Continue reading
Naming Contexts
Continuing our quick look at The ActiveDirectory name space lets have a look at the MSAD_NamingContext class Get-WmiObject -Namespace root\MicrosoftActiveDirectory -Class MSAD_NamingContext | Format-Table DistinguishedName, IsFullReplica –AutoSize DistinguishedName IsFullReplica—————– ————-DC=DomainDnsZones,DC=Manticore,DC=org TrueDC=ForestDnsZones,DC=Manticore,DC=org TrueCN=Schema,CN=Configuration,DC=Manticore,DC=org TrueCN=Configuration,DC=Manticore,DC=org TrueDC=Manticore,DC=org True This is equivalent … Continue reading
Active Directory and WMI
A lot of the Active Directory related functionality has been removed from WMI but there is a little bit left in the root\MicrosoftActiveDirectory namespace. This is on a Windows 2008 R2 domain controller – I don’t know if this is … Continue reading
Setting user address information
In AD Users & Computers the user’s properties dialog has a tab for setting address information if (-not (Get-Module ActiveDirectory)){ Import-Module ActiveDirectory } $ou = “OU=England,DC=Manticore,DC=org” $street = @” 123 Somewhere Place, A big suburb “@ $PObox = “PO … Continue reading
PowerShell Deep Dive 2012
The 2012 PowerShell Deep Dive has been announced – April 29 – May 2 in San Diego. http://blogs.msdn.com/b/powershell/archive/2012/01/27/it-s-time-for-another-powershell-deep-dive.aspx This time PowerShell is a full track so expect more of your favourite stuff. Hope to see you there.
Posted in Deep Dive, Powershell
Leave a comment
Restricting a user’s computers
On the Account tab of an AD user’s properties there is a button labelled “Logon to …” that can be used to restrict the computers a user can logon onto. The default is that users can log onto any machine. … Continue reading
Integer sizes
If you’ve used PowerShell for any time you will be away of [int] meaning integer. One common use is in functions to define a parameter’s data type function test1 { param ( [int]$a, [int]$b ) $a * … Continue reading
Posted in Powershell Basics
Leave a comment
Setting a users logon hours
By default a user can logon 24/7. Is this acceptable – should users be able to logon during the night or weekends. AD Users and Computers has a GUI to set the hours users can logon. But we don’t need … Continue reading
Creating an OU
Creating an OU is a fairly common activity. The GUI is quick enough for a single OU but we need PowerShell for bulk creation. Its a straight forward activity if (-not (Get-Module ActiveDirectory)){ Import-Module ActiveDirectory } $ou = “OU=BlogTests,DC=Manticore,DC=org” “`nMicrosoft” … Continue reading