11. Remotely retrieve disk size, FreeSpace and % of FreeSpace with PowerShell

  Рет қаралды 20,236

CyberAutomate

CyberAutomate

Күн бұрын

Пікірлер: 28
@jonathanmoore6446
@jonathanmoore6446 7 жыл бұрын
Thank you for taking the time to publish this. Extremely helpful showing the output in the Excel and HTML format.
@CyberAutomate
@CyberAutomate 7 жыл бұрын
+Jonathan Moore glad you found it useful.
@RayKinard
@RayKinard 4 жыл бұрын
Subscribed immediately after your intro logo :)
@amarsakhare5422
@amarsakhare5422 3 жыл бұрын
can we assign permission for % of folder to be free..
@sagarprajapati5857
@sagarprajapati5857 2 жыл бұрын
this code works for me..Thanks for this helpful video.
@lockonStratos90
@lockonStratos90 5 жыл бұрын
I need the XML mark if the percentage is less than 25 ... is it possible?
@amarsakhare5422
@amarsakhare5422 3 жыл бұрын
Hi, Need power shell Script to - Auto delete "files" after folder quota limit 80% finish is it possible to make script in power shell i need its very urgent..
@amarsakhare5422
@amarsakhare5422 3 жыл бұрын
Hi, Need power shell Script to - Auto delete "files" after folder quota limit finish is it possible to make script in power shell i need its very urgent.. Thanks Amar
@anupsk1427
@anupsk1427 6 жыл бұрын
Could you pls provide me with script
@sudeepkoroth1468
@sudeepkoroth1468 4 күн бұрын
Description Url is not working
@CyberAutomate
@CyberAutomate 2 күн бұрын
Sorry about that, I'm still in the process of moving all my legacy code to Github
@sudeepkoroth1468
@sudeepkoroth1468 Ай бұрын
Thanks a lot
@dfhayak
@dfhayak 6 жыл бұрын
Is it possible to get the URL updated on where to grab this script? You have some great videos.
@CyberAutomate
@CyberAutomate 6 жыл бұрын
www.signalwarrant.com/remotely-retrieve-disk-space-size-freespace-freespace-powershell/
@dfhayak
@dfhayak 6 жыл бұрын
@@CyberAutomate TY Sir
@server-alertmonitoring6670
@server-alertmonitoring6670 6 жыл бұрын
How to get email notification
@jegadeeshk1038
@jegadeeshk1038 7 жыл бұрын
Am getting the below error when i test this script. Could you please advice me. PS C:\Users\jega> #> # Change the $exportpath to whatever path you want the html and csv files in. $exportPath "C:\scripts\drive_info" # I change this to a central fileshare # your computers.txt will need to be in this folder $computers = Get-Content "C:\sccripts\drive_info\computers.txt" # This is only used for the HTML file output option. # If you're not using HTML, you can delete this section # Start HTML output file style $style = "" $style = $style + "Body{background-color:white;font-family:Arial;font-size:10pt;}" $style = $style + "Table{border-width:1px;border-style: solid; border-color: black; border-collapse: collapse;}" $style = $style + "TH{border-width: 1px; padding: 2px; border-style: solid; border-color: black; background-color: #cccccc;}" $style = $style + "TD{border-width: 1px; padding: 5px; border-style: solid; border-color: black; background-color: white;}" $style = $style + "" # End HTML Output file style $driveinfo = Get-WMIobject win32_LogicalDisk -ComputerName $computers -filter "DriveType=3" | Select-Object systemName, DeviceID, VoulmeName, @{Name="Size(GB)"; Expression={"{0:N1}" -f($_.size/1gb)}}, @{Name="FreeSpace(GB)"; Expression={"{0:N1}" -f($_.freespace/1gb)}}, @{Name="% FreeSpace(GB)"; Expression={"{0:N2}%" -f(($_.freespace/$_.size1gb)"100)}}, @{Name="Date"; Expression={$(Get-Date -format 'g')}} # Various Output Options $driveinfo | Out-GridView $driveinfo | Format-Table -AutoSize $driveinfo | Export-Csv "$exportPath\Server_Drivespace.csv" -NoTypeInformation -NoClobber -Append $driveinfo | ConvertTo-Html -Head $style | Out-File $exportPath\Server_Drivespace.htm -NoClobber -Append Unexpected token 'C:\scripts\drive_info' in expression or statement. At line:4 char:14 Missing statement after '=' in hash literal. At line:22 char:73 Missing statement after '=' in hash literal. At line:23 char:83 Unexpected token '100)}}, @{Name=' in expression or statement. At line:24 char:93 The string starting: At line:31 char:59 + $driveinfo | Export-Csv "$exportPath\Server_Drivespace.csv
@CyberAutomate
@CyberAutomate 7 жыл бұрын
One thing I can see is you have an extra C in the $computers line. $computers = Get-Content "C:\sccripts\drive_info\computers.txt"
@mrstrange6818
@mrstrange6818 4 жыл бұрын
you are a great man. I found lots of code and how to check multiple servers disk usage but I can't figure out..!! finally, this code help me 👍😍
@ANIl1454
@ANIl1454 3 жыл бұрын
Thanks for the same, any idea how do i get partition information such as MBR or GPT for 120+ servers remotely ? output in a file. Below script i used but not helping, as it doesnt get data from more than 1 machine. $LogDate = get-date -f yyyyMMddhhmm $File = Get-Content -Path D:\disk\servers.txt $DiskReport = ForEach ($Servernames in ($ServerList)) {} Invoke-Command -computername $Servernames -scriptblock { Get-Disk } | Select-Object Number, PartitionStyle
@raymondvargas
@raymondvargas 6 жыл бұрын
hi, what inside computer.txt file?
@vickywani860
@vickywani860 5 жыл бұрын
Put your system name
@chandrapilli5449
@chandrapilli5449 7 жыл бұрын
Extremely happy with your Script, can you please send me auto schedule mail trigger also if possible..thanks
@OZSCQUADS
@OZSCQUADS 8 жыл бұрын
great script mate. I wanted something like this but need a couple more tweaks. 1. Get server list from AD not text file 2. Get details of all local drives. I tried to add a server to the computers text file which has multiple drives, but it doesn`t want to give that info
@CyberAutomate
@CyberAutomate 8 жыл бұрын
You should be able to use the Get-ADComputer CMDlet to get computer names from an OU in AD and pipe the results into the script or have it write them to the text file.
@amarsakhare5422
@amarsakhare5422 3 жыл бұрын
Hi, Need power shell Script to - Auto delete "files" after folder quota limit 80% finish is it possible to make script in power shell i need its very urgent..
15. How to get the last user logged into a computer with PowerShell
6:18
How to Manage Hard Disk using PowerShell
6:34
Britec09
Рет қаралды 22 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Send An Email From Powershell
3:26
MrPowerScripts
Рет қаралды 52 М.
Creating a new volume in PowerShell
4:56
David Dalton
Рет қаралды 865
PowerShell create a scheduled task
5:50
Shane Young
Рет қаралды 49 М.
Format-Table with row colors in PowerShell
7:13
SPJeff
Рет қаралды 1,1 М.
Docker Image BEST Practices - From 1.2GB to 10MB
7:15
Better Stack
Рет қаралды 125 М.
PowerShell Installing software remotely on Multiple Computers
6:30
Swapnil Infotech
Рет қаралды 3,9 М.
Exploring PowerShell objects with Get-Member
7:43
David Dalton
Рет қаралды 2,2 М.
How To Get Disk Space Report For multiple MS SQL Servers
7:50
MS SQL DBA Tech Support
Рет қаралды 1,7 М.
Automate your PowerShell scripts with Windows Task Scheduler
8:24
Shane Young
Рет қаралды 134 М.