Get Drive space

How to detect all the free spaces available in all drives of a VM using UlPath vbscript
but get drive info is not available

Hi!

You could just do a powershell script and invoke it.
See this thread:
Get Disk Storage Value from Remote Computers - Help / Forum - UiPath Community Forum

thats not relevant
i had already checked

Here’s a basic script for you to start out with:

Get-PSDrive -PSProvider FileSystem | ForEach-Object {
    $drive = $_
    $freeSpace = [math]::Round($drive.Free / 1GB, 2)
    $totalSpace = [math]::Round($drive.Used / 1GB, 2) + $freeSpace
    Write-Output "Drive $($drive.Name): $freeSpace GB free out of $totalSpace GB"
}

It goes through each drive and outputs both the freespace and totalspace: