Home Forums Programming Powershell Need help to get file count from remote server directory using powershell RE: Need help to get file count from remote server directory using powershell

  • If remote command execution is open between the servers or computers you can use Invoke-Command:

    Invoke-Command -Computer MYSERVER28 {(dir 'T:\System Volume Information').Count}

    Shawn Melton
    Twitter: @wsmelton
    Blog: wsmelton.github.com
    Github: wsmelton