Skip to main content

Posts

Showing posts from April, 2010

comparing home directories to user names with powershell

aside from just enjoying scripting, i particularly love scripting requests that start with something like -- “i want to know if this is possible…”.  my coworker put it best about why scripting is enjoyable.  it has a definite start and (usually) a definite end.  it comes with a sense of accomplishment when you’re done.  that’s nice.  kind of like… building a birdhouse or something. anyway, the request was to compare a user’s home directory value to the user id to see if the user has the correct mapping.  sometimes while cloning accounts, this process may carry over something undesirable.  pretty simple stuff right? let’s pretend you have a user named “Reimer Davies”.  his properties are as follows: user id: “ReDavies” home directory: \\myfileserver\redavies$ (yes, i know the mapping is old school home path.  this is what i had to deal with so bear with the example.  you can always change around the text manipulation statements to make it do what you want.) anyway, her

using accountneverexpires with get-qaduser

if you’re trying to use the AccountNeverExpires parameter, you may not find the built-in help very forthcoming.  it specifies the use as: -AccountNeverExpires Set the value of this parameter to 'true' if you want the cmdlet to retrieve only those user accounts that are configured to never expire. i can tell you with confidence the following fails: -accountneverexpires true -accountneverexpires $true   so what works? -accountneverexpires : $true   apparently, it requires a colon between accountneverexpires and $true.

behaviors with configmgr and supernets

i was forwarded a very useful blog post called “ clarification on issues resulting from the use of supernets in configmgr 2007 ”.  if you need details, i urge you to read it.  this is just a summary of the post for my own benefit. related blog posts: known issue: supernets in active directory sites used as site boundaries some configmgr 2007 clients never install packages, report status of “waiting on content”   site assignment / client push: adsysdis writes ad site and ip subnet information to ddr ddm compares ddr data against site boundaries if ad site is in site boundaries, assigned = yes if supernet is listed in site boundaries (directly), assigned = yes client’s true subnet (non-supernet) listed in site boundaries, assigned = no   package source location: client posts request to mp with the following: package id package version assigned site code ip address calculat