Thread: A array problem
View Single Post
Old 08-10-2007   #2 (permalink)
Brandon Shell


 
 

Re: A array problem

try this
"CN=$($hn)$($b[$a]),OU=local,OU=roles,DC=cz,DC=int-e,DC=kaufland"

The "$( )" Expands the result of $b[$a] and outputs the string instead.

"Jens Diekers" <Jens Diekers@discussions.microsoft.com> wrote in message
news:2E8F00FF-EFD5-4874-982A-6635B4CC585F@microsoft.com...
> in this little command i want to access a element of a array: please look
>
> for ($a=0; $a -le 8; $a++) {dsadd group
> "CN=$hn$b[$a],OU=local,OU=roles,DC=cz,DC=int-e,DC=kaufland" -scope l
>
> The output of the defined variable $hn is ok, but when i want to access
> $b[$a] variable, the array will output his whole content. Do I have to
> mascerade my $b variable?
>
> Any help is welcome?
> THX


My System SpecsSystem Spec