Skip to content

Set-IntunePrimaryUsers issues running in Interactive mode #26

@toddfreer

Description

@toddfreer

I'm getting the following errors when running the script in interactive mode with no modifications.

At \Set-IntunePrimaryUsers.ps1:1374 char:66

  • ... Write-Output (" {0,-30}: {1,6} ({2,5}%)" -f $a ...
  •                                                              ~
    

You must provide a value expression following the '%' operator.
At \Set-IntunePrimaryUsers.ps1:1378 char:66

  • ... Write-Output (" {0,-20}: {1,6} ( 0.0%)" -f $a ...
  •                                                              ~
    

You must provide a value expression following the '%' operator.
At \Set-IntunePrimaryUsers.ps1:1605 char:169

  • ... User')"; OSFilter = "startsWith(deviceDetail/operatingSystem,'Android ...
  •                                                             ~
    

Missing argument in parameter list.
At \Set-IntunePrimaryUsers.ps1:1606 char:161

  • ... User')"; OSFilter = "startsWith(deviceDetail/operatingSystem,'iOS')" ...
  •                                                             ~
    

Missing argument in parameter list.
At \Set-IntunePrimaryUsers.ps1:1607 char:165

  • ... User')"; OSFilter = "startsWith(deviceDetail/operatingSystem,'MacOs') ...
  •                                                             ~
    

Missing argument in parameter list.
At \Set-IntunePrimaryUsers.ps1:1608 char:140

  • ... q true"; OSFilter = "startsWith(deviceDetail/operatingSystem,'Windows ...
  •                                                             ~
    

Missing argument in parameter list.
At \Set-IntunePrimaryUsers.ps1:1609 char:187

  • ... User')"; OSFilter = "startsWith(deviceDetail/operatingSystem,'Windows ...
  •                                                             ~
    

Missing argument in parameter list.
At \Set-IntunePrimaryUsers.ps1:1905 char:2

  • }
  • ~
    The Try statement is missing its Catch or Finally block.
    At \Set-IntunePrimaryUsers.ps1:1323 char:13
  • Process {
    
  •         ~
    

Missing closing '}' in statement block or type definition.
At \Set-IntunePrimaryUsers.ps1:1270 char:30

  • function Invoke-ScriptReport {
  •                          ~
    

Missing closing '}' in statement block or type definition.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ExpectedValueExpression

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions