Solved

List files/folders with size on server core

Posted on 2014-09-25
3
203 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Table of Contents: Lesson 1 - Installing Windows Server 2012 (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2012/A_11592-Become-an-Administrator-Installing-Windows-Server-2012.html) Lesson 2 - Configuring Ser…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
In this Micro Tutorial viewers will learn how to restore their server from Bare Metal Backup image created with Windows Server Backup feature. As an example Windows 2012R2 is used.
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…

777 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