Relevance / fixlet question

Hey guys. I have a powershell script that is working great. I use create file and it is bombing out at a line as it is created. Results are posted below. Any ideas why it is failing here?

Completed createfile until END_OF_FILE
Completed
Completed function Get-DellWarrantyInfo {
Completed Param(
Completed [Parameter(Mandatory = $true)]
Completed $ServiceTags,
Completed [Parameter(Mandatory = $true)]
Completed $ApiKey,
Completed [Parameter(Mandatory = $true)]
Completed $KeySecret
Completed )
Completed
Completed [String]$servicetags = $ServiceTags -join ", "
Completed
Completed $AuthURI = "https://apigtwb2c.us.dell.com/auth/oauth/v2/token"
Completed $OAuth = "$ApiKey`:$KeySecret"
Completed $Bytes = [System.Text.Encoding]::ASCII.GetBytes($OAuth)
Completed $EncodedOAuth = [Convert]::ToBase64String($Bytes)
Failed $Headers = @{ }
$Headers.Add(ā€œauthorizationā€, ā€œBasic $EncodedOAuthā€)
$Authbody = ā€˜grant_type=client_credentialsā€™

1 Like

after a little more searching, i know it has to do with the curly brace. just not sure how to fix it.

To include a literal open curly-brace in your Powershell, escape it by doubling it up. { becomes {{.

1 Like

Thank you. Iā€™ll try that.