To flatten the hierarchy, use this command:
dsquery group -limit 0 | select-string group_to_find | dsget group -members -expand
dsquery group -limit 0 | select-string group_to_find | dsget group -members -expand

[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2," +
"PublicKey=00240000048000009400000006020000002400005" +
"25341310004000001000100c547cac37abd99c8db225ef2f6c8" +
"a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7" +
"852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0" +
"a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15" +
"605093924cceaf74c4861eff62abf69b9291ed0a340e113be11" +
"e6a7d3113e92484cf7045cc7")]
param(
[parameter(mandatory=$true)][string]$SourceFile,
[parameter(mandatory=$true)][string]$DestinationFolder)
if(-not (test-path $DestinationFolder))
{
md $DestinationFolder | Out-Null
}
$absoluteSource = resolve-path $SourceFile | select -ExpandProperty path
$absoluteDestination = resolve-path $DestinationFolder | select -ExpandProperty path
$app = new-object -ComObject Shell.Application
$archive = $app.Namespace($absoluteSource).Items()
$dest = $app.Namespace($absoluteDestination)
$dest.CopyHere($archive)
$cmd = "& `"application`" /p:`"path`"; `$result = `$?"
Invoke-expression $cmd
if(!$result)
{
throw "Application failed."
}