Skip to main content

Comments

1 comment

  • John Schoenstein

    I wrote PS code to get it. this gives you a CSV with the results and if the path is still valid (from the server side of things).

    [xml]$file = get-content 'c:\software\user_shared_files.xml'
    $newarray = @()

    foreach ($node in $file.cerberus.filelist.file)
    {
    $exist = Test-Path $node.localpath

    $outputobject = new-object psobject

    $outputobject | add-member -membertype NoteProperty -name "sharedby" -value $node.sharedby

    $outputobject | add-member -membertype NoteProperty -name "guid" -value $node.guid

    $outputobject | add-member -membertype NoteProperty -name "localpath" -value $node.localpath

    $outputobject | add-member -membertype NoteProperty -name "shareddate" -value $node.shareddate

    $outputobject | add-member -membertype NoteProperty -name "shareduntil" -value $node.shareduntildate

    $outputobject | add-member -membertype NoteProperty -name "IsValid" -Value $exist

    # enable to display on screen
    #$node.sharedby
    #$node.guid
    #$node.localpath
    #$node.remotepath
    #$node.shareddate
    #$node.shareduntil

    $newarray +=$outputobject

    }
    $newarray |export-csv "c:\software\shared_folders.csv" -notypeinformation

    1

Please sign in to leave a comment.