$searcher.SearchScope = [System.DirectoryServices.SearchScope].subtree Exception setting "SearchScope": "Cannot convert null to type "System.Directory Services.SearchScope" due to invalid enumeration values. Specify one of the fol lowing enumeration values and try again. The possible enumeration values are "B ase, OneLevel, Subtree"." At C:\scripts\pdriveclean.ps1:18 char:11 + $searcher.S <<<< earchScope = [System.DirectoryServices.SearchScope].subtree
$searcher.SearchScope = [System.DirectoryServices.SearchScope].subtree There's a new microsoft.public.windows.powershell group.
Thanks I thought that this was visible on that site also. also if I move the [] brackets I get the following error. Unable to find type [System.DirectoryServices.SearchScope.subtree]: make sure hat the assembly containing this type is loaded. At C:\scripts\hines\pdrive\pdriveclean.ps1:18 char:71 + $searcher.SearchScope = [System.DirectoryServices.SearchScope.subtree] <<<< -- DDO
I'm not a DiretoryServices guy, but I think what you want is this: PS> [System.DirectoryServices.SearchScope]::Subtree Static methods/properties are called using "::" instead of "." Use this to see all static members: PS> [System.DirectoryServices.SearchScope] | get-member -static -- greetings dreeschkind