Last active
August 29, 2015 14:25
-
-
Save mkesper/173f0884f50e13c37a37 to your computer and use it in GitHub Desktop.
Why i18n of commands is a very bad idea
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Thank you, Microsoft! | |
switch((Get-UICulture).Name){ | |
# You need to check for every Culture the script could encounter | |
"de-DE" {$Yes = "J"} | |
default {$Yes = "Y"} | |
} | |
$TakeOwnParameters = @("/f", $Share, "/R", "/D", $Yes) | |
Invoke-Expression "takeown.exe @TakeOwnParameters" | Write-Output |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment