Solved

List files/folders with size on server core

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

My GPO's made for 2008 R2 servers were not allowing me to RDP into a new 2012 server by default.  That’s why I tried to allow RDP via Powershell, because I could log into a remote shell without further configuration. Below I will describe how I wen…
The reason that corporations and businesses use Windows servers is because it supports custom modifications to adapt to the business and what it needs. Most individual users won’t need such powerful options. Here I’ll explain how you can enable Wind…
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

830 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