list-dfslinks - how do i use the output from targets?

May 9, 2012 at 12:36 PM

hello,

thank´s again for adding the list-dfs* thing, now i want to use it in a script but i fail...

i have many links with one target each, i´d like to use the path variable from the link to check if the target is still available and delete the link if not. unfortunately it is of type system.object and the output looks like @{path=\\xxx\xxx; state=...}

can you please help me how can i use the targets variable?

thank´s a lot for your help!

brgds Andreas

May 9, 2012 at 1:11 PM

hello,

i managed to fix it!

first i must put $_.Targets in a variable that i declare as [Array], then i can loop trough the variable and have access to $_.path. if i want to use $variable.path directly i don´t get what i want.

is there an easier way to do this?

brgds Deas