How can I utilize the Add-WindowsCapability function through a proxy in PowerShell?

I am trying to install OpenSSH on a Windows Server 2019 machine in an environment without external network access and with a configured proxy at "http://10.99.99.99:80". I am using PowerShell with administrative privileges and have set the HTTP_PROXY and HTTPS_PROXY environment variables as follows: $Proxy = "http://10.99.99.99:80" $ENV:HTTP_PROXY=$proxy $ENV:HTTPS_PROXY=$proxy However, when I try to install… Read More How can I utilize the Add-WindowsCapability function through a proxy in PowerShell?

Write-Host prints entire object instead of one property of it when surrounded by quotes

$AllDrivesExceptBootDrive = Get-Volume | Where-Object {$_.DriveLetter -ne ‘C’} | Select-Object DriveLetter, AllocationUnitSize foreach ($d in $AllDrivesExceptBootDrive) { Write-Host "Checking Drive $d.DriveLetter" } Prints: Checking Drive @{DriveLetter=F; AllocationUnitSize=4096}.DriveLetter Checking Drive @{DriveLetter=G; AllocationUnitSize=4096}.DriveLetter Checking Drive @{DriveLetter=E; AllocationUnitSize=4096}.DriveLetter Checking Drive @{DriveLetter=H; AllocationUnitSize=4096}.DriveLetter Checking Drive @{DriveLetter=I; AllocationUnitSize=4096}.DriveLetter How do I keep quotes around Write-Host and still print it as… Read More Write-Host prints entire object instead of one property of it when surrounded by quotes