In PowerShell:
$varYes=cmd /c "choice <nul 2>nul" $varYes=($varYes -replace '[^a-zA-Z]')[0]
Then your takeown command, with $varYes in the place of whichever confirmation letter you would normally use.
takeown
$varYes