none
Powershell Find File on Network Share

    Question

  • How can I write a Powershell script to find a file on a network share based on user input?

    If the file is found then I would like to move it to another directory.

    Thank you,

    Mike

    Thursday, January 17, 2013 7:01 PM

Answers

  • Get-ChildItem -Path "Z:" -Recurse | Where-Object { !$PsIsContainer -and [System.IO.Path]::GetFileNameWithoutExtension($_.Name) -eq "hosts" }
    • Marked as answer by Mike_ST_Smith Thursday, January 24, 2013 4:55 PM
    Thursday, January 24, 2013 4:55 PM

All replies