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

Cannot validate argument #481

Open
Latiron opened this issue May 4, 2023 · 2 comments
Open

Cannot validate argument #481

Latiron opened this issue May 4, 2023 · 2 comments

Comments

@Latiron
Copy link

Latiron commented May 4, 2023

Need help understanding why I am getting this error in the smsts.log file when it gets to the MDM step. I'm new to using this tool, so all help is appreciated. I have renamed our server info for security reasons. I have tried with the quotes shown in the examples and without them.

C:_SMSTaskSequence\Packages\H010022E\Invoke-CMApplyDriverPackage.ps1 : Cannot validate argument on parameter RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)
'TargetOSName'. The argument "Windows" does not belong to the set "Windows 11,Windows 10" specified by the ValidateSet RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)
attribute. Supply an argument that is in the set and then try the command again. RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)
At line:1 char:140 RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)

  • ... -Endpoint mecm-servername-here.com -TargetOSName Windows 11 -Tar ... RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)
  •                                                       ~~~~~~~	RunPowerShellScript	5/4/2023 3:18:44 PM	2100 (0x0834)
    
    • CategoryInfo : InvalidData: (:) [Invoke-CMApplyDriverPackage.ps1], ParameterBindingValidationException RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Invoke-CMApplyDriverPackage.ps1 RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)
      RunPowerShellScript 5/4/2023 3:18:44 PM 2100 (0x0834)
@PowershellBacon
Copy link

PowershellBacon commented May 4, 2023

-TargetOSName Windows 11 is wrong, you need to have it in quotes, right now its passing WINDOWS as the -targetosname. not windows 11. It should be -TargetOSName 'Windows 11'

@Latiron
Copy link
Author

Latiron commented May 4, 2023

Yeah, I found another post in one of the other MDM githib listings. We had tried what was in the documentation, which is " double quotes. The issue posted in the other group said to try ' single quotes. I did that and it seems to have resolved the issue. At least on one Dell Latitude 7420. Testing on an XPS model now to see how that goes. Thanks for the reply.

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

2 participants