Various directoryservice related functions.