Solved

Powershell with robocopy for finding folder size

Posted on 2013-11-26
5
587 Views
Last Modified: 2013-11-26
Got the code  for extracting share details from below link . Could you please help how to export  a remote server  share details with this code .  

http://www.expertsexchange.com/Programming/Languages/Scripting/Powershell/Q_28303849.html


code
Get-WmiObject Win32_Share | ?{$_.Type -eq 0} | Select Name,Path | Export-Csv C:\report.csv

----------------------------
0
Comment
Question by:Shani Basha
  • 3
5 Comments
 
LVL 19

Expert Comment

by:Patricksr1972
ID: 39678909
Hi

Do you mean something like this?
 
Get-WmiObject win32_Share -computername remotecomputername
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39678922
Use ComputerName parameter to get info about remote computer.. I have added custom property Sharepath to get the UNC path for directory..
Get-WmiObject Win32_Share -ComputerName "ServerA" | ?{$_.Type -eq 0} | Select Name,Path,@{N="Sharepath";E={"\\$($_.__SERVER)\$($_.Name)"}} | Export-Csv C:\report.csv

Open in new window

0
 
LVL 9

Author Comment

by:Shani Basha
ID: 39678974
. Actually i am trying to export share details from a netapp v filer ( virtual cifs server).

I can connect computer managmentent of  vfiler and export share details  as a windows server

the  Get-WmiObject Win32_Share is not working since its not a windows server. is there a

way to write code like by connecting computer management and then export share details
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 39678992
In computer management share folder, you can just right click and export the list to csv file..
0
 
LVL 40

Expert Comment

by:Subsun
ID: 39679038
Another option is to use NetApp  powershell module command Get-nacifsshare..

Here is an example..
Import-Module dataontap
connect-nacontroller "filer02"
Get-nacifsshare | Select -expand ShareName

Open in new window

0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Set OWA language and time zone in Exchange for individuals, all users or per database.
A procedure for exporting installed hotfix details of remote computers using powershell
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now