Solved

List files/folders with size on server core

Posted on 2014-09-25
3
198 Views
Last Modified: 2014-09-30
Hi Experts, is there a powershell command to list largest files and folders under C:\ for a 2012 server core?

TIA
0
Comment
Question by:abhijitm00
  • 2
3 Comments
 
LVL 13

Expert Comment

by:Rizzle
ID: 40344834
Hi,

I have used this article to achieve this in the past hopefully it will help you achieve what you need it to.

http://blogs.technet.com/b/heyscriptingguy/archive/2014/02/03/list-files-in-folders-and-subfolders-with-powershell.aspx

Bear in mind when using the above article to run the commands within powershell ensure you run Powershell as admin.
0
 

Author Comment

by:abhijitm00
ID: 40344956
Thanks. Is there a way to store this info into a .txt file and obtain that file from the core server?
0
 
LVL 13

Accepted Solution

by:
Rizzle earned 500 total points
ID: 40346566
After running the Powershell script to list what you need, you would use

The below is the CMDLET also listed in the article to list file and folders and then output to a text file on the D drive.

The "Out File" part of the CMDLET is what exports the Powershell results to the text file.

Get-ChildItem "E:\" | Out-File "D:\FileLengthReports\Result1.txt"
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

708 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

12 Experts available now in Live!

Get 1:1 Help Now