Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

How to list files and folders from Shared Network Folder

$
0
0

Hello

I am generating CSV using following script. It is working correctly. But  when I try to change the path from local folder to network folder and execute script from my machine nothing happens it seems I need to pass the credentials (username, password and domain name)  but I am not sure how can I do this? Please let me know how can I do pass parameter in following script?

$AllFiles = @()
foreach ($file in get-childitem $FolderPath  -recurse | Select-Object FullName, Root, Directory, Parent, Name, Extension, PSIsContainer, IsReadOnly, Length, CreationTime, LastAccessTime, LastWriteTime, Attributes)
{
...
}


Viewing all articles
Browse latest Browse all 2562

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>