Question: what does this section of a script mean ection 5 else { $volume = Get - Volume - ErrorAction Stop | Where - Object {

what does this section of a script mean ection 5
else {
$volume = Get-Volume -ErrorAction Stop | Where-Object { $_.DriveLetter -eq
$Drive }
if ($volume){
$total = $volume.Size
$percentFree =[int](($volume.SizeRemaining / $total)*100)
Add-Content -Path $logFile -Value "[INFO] Percent Free: $percentFree%"
}
else {
Add-Content -Path $logFile -Value "[ERROR] $Drive was not found."
throw
}
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!