Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Boolean values are converted to strings #25

Open
klaidliadon opened this issue Jan 10, 2019 · 0 comments
Open

Boolean values are converted to strings #25

klaidliadon opened this issue Jan 10, 2019 · 0 comments

Comments

@klaidliadon
Copy link

I noticed that if one of the $args is a boolean like $false it gets converted to a string and causes problems in some cmdlets.

> sudo Disable-NetAdapter -Name "Wi-Fi" -Confirm:$false
Disable-NetAdapter : Cannot convert 'System.String' to the type 'System.Management.Automation.SwitchParameter' required by parameter 'Confirm'.

> sudo powershell
# Disable-NetAdapter -Name "Wi-Fi" -Confirm:$false
# Enable-NetAdapter -Name "Wi-Fi" -Confirm:$false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant