# Html code in Powershell script

**URL:** <https://forums.powershell.org/t/html-code-in-powershell-script/22931>\
**Category:** PowerShell Help\
**Created:** [September 28, 2023, 1:32pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931 "2023-09-28T13:32:38Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Killerbe](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@Killerbe](https://forums.powershell.org/u/Killerbe)\
**Post date:** [September 28, 2023, 1:32pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/1 "2023-09-28T13:32:39Z")

</div>

I am writing a script that sends a html mail message. Although i have done this many times in the past, i cannot get it work now. it keeps failing on the formatting of the body.

```auto
            $Body = 
                "
                <p>Dear $AdManagerobj.GivenName,<br>
                <p><br>
                "

```

It keeps failing on the ‘,’ or “\<”.

```auto
Missing Expression after ',' in pipeline element
the '<' operator is reserved for future use

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 28, 2023, 2:44pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/2 "2023-09-28T14:44:24Z")

</div>

For string variables spanning more than one line you should use a here string. And if you want to expand variables inside this strings you should use the subexpression operator.

```auto
$Body = @"
<p>Dear $($AdManagerobj.GivenName),<br>
<p><br>
"@

```

---

<div class="post-metadata">

**Author:** ![Killerbe](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@Killerbe](https://forums.powershell.org/u/Killerbe)\
**Post date:** [September 29, 2023, 7:44am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/3 "2023-09-29T07:44:50Z")

</div>

> [@Olaf](#):
>
> subexpression operator

Thanks Olaf. But i tried that before opening this topic.  
My original code was=

```auto
$Body =
"
<p> Dear $($AdManagerObj.GivenName),<br>
<p><br>
"

```

and ran into the described issue. Searched around on the internet and indeed came across the here string, wherefore i added the @ signs to the string.

```auto
$Body =
@"
<p> Dear $($AdManagerObj.GivenName),<br>
<p><br>
"@

```

As that did not resolve it, i decided to ask for some help from the experts.  
As always, something that looks quite straightforward, turns up to be a total scramble…

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 29, 2023, 7:48am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/4 "2023-09-29T07:48:50Z")

</div>

> [@Killerbe](#):
>
> As always, something that looks quite straightforward, turns up to be a total scramble…

So you may explain a little more detailed what issue you actually have. … the bigger picture … Please share all relevant code and the complete error messages you get.

---

<div class="post-metadata">

**Author:** ![Killerbe](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@Killerbe](https://forums.powershell.org/u/Killerbe)\
**Post date:** [September 29, 2023, 9:28am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/5 "2023-09-29T09:28:29Z")

</div>

```auto
At C:\System\Scripts\PasswordExpiry\PasswordExpiery.ps1:128 char:36
+ <p>Dear $($AdManagerobj.GivenName),<br>
+ ~
Missing expression after ',' in pipeline element.
At C:\System\Scripts\PasswordExpiry\PasswordExpiery.ps1:128 char:36
+ <p>Dear $($AdManagerobj.GivenName),<br>
+ ~

```

```auto
            $Body = 
@"
<p>Dear $($AdManagerobj.GivenName),<br>
<p><br>
<p>The password of your account $($Obj.Name) has expired. Therefore you will no longer be able to use this account to log on.<br>
<p>You can reset the password via $($link), by logging in with your admin credentials.<br>
<p>After modifying the account's password, you will be able to use the account again.<br>
<p><br>
<p>Kind Regards,<br>
<p><br>
<p>ICT Systems<br>
"@
            }

```

I had to remove the indent because of the whitespace issue in here strings.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 29, 2023, 9:50am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/6 "2023-09-29T09:50:24Z")

</div>

> [@Killerbe](#):
>
> I had to remove the indent because of the whitespace issue in here strings.

Your posts confuse me more and more … does that mean you solved your issue?

… and yes - at least for the closing here string marks there are no other characters allowed to be in front of it. Just like the documentation states …

> **[about Quoting Rules - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules?view=powershell-7.3#here-strings)**
>
> Describes rules for using single and double quotation marks in PowerShell.

> A here-string:
> 
> - spans multiple lines
> - begins with the opening mark followed by a newline
> - ends with a newline followed by the closing mark
> - includes every line between the opening and closing marks as part of a single string

---

<div class="post-metadata">

**Author:** ![Killerbe](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@Killerbe](https://forums.powershell.org/u/Killerbe)\
**Post date:** [September 29, 2023, 9:56am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/7 "2023-09-29T09:56:05Z")

</div>

[Reindent Lines breaks here-strings](https://github.com/PowerShell/vscode-powershell/issues/977)

My original script followed the indent as this is running in a foreach loop.

```auto
            # Retrieving Manager
            $AdManagerObj = Get-ADUser $Obj.Manager -Properties Mail
            #$MesTitle = "Your Admin account's password has expired"
            If ($Null -eq $Obj.AdminDescription) {
            $Body = 
@"
<p>Dear $($AdManagerobj.GivenName),<br>
<p><br>
<p>The password of your account $($Obj.Name), has expired. Therefore you will no longer be able to use this account to log on.<br>
<p>You can reset the password via $($link), by logging in with your admin credentials.<br>
<p>After modifying the account's password, you will be able to use the account again.<br>
<p><br>
<p><br>
<p>Kind Regards,<br>
<p><br>
<p>ICT Systems<br>
"@
            }
            Else {
                $Body = 

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 29, 2023, 10:01am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/8 "2023-09-29T10:01:35Z")

</div>

Have you solved your issue?

---

<div class="post-metadata">

**Author:** ![Killerbe](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@Killerbe](https://forums.powershell.org/u/Killerbe)\
**Post date:** [September 29, 2023, 10:15am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/9 "2023-09-29T10:15:00Z")

</div>

No, still the same error although placing the body in a here-string and using Subexpression Operators.  
And still fails on the coma “,” in the here-string:

```auto
At C:\System\Scripts\PasswordExpiry\PasswordExpiery.ps1:128 char:36
+ <p>Dear $($AdManagerobj.GivenName),<br>
+ ~
Missing expression after ',' in pipeline element.
At C:\System\Scripts\PasswordExpiry\PasswordExpiery.ps1:128 char:36
+ <p>Dear $($AdManagerobj.GivenName),<br>
+   

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 29, 2023, 10:23am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/10 "2023-09-29T10:23:16Z")

</div>

OK. Final call: Show your code.

… and the code you show should have at least 128 lines!! ☝🏼

---

<div class="post-metadata">

**Author:** ![Killerbe](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@Killerbe](https://forums.powershell.org/u/Killerbe)\
**Post date:** [September 29, 2023, 10:51am UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/11 "2023-09-29T10:51:43Z")

</div>

```auto
Start-Transcript -Path C:\System\Scripts\PasswordExpiry\Log\Transcript.txt -Append
$Date = Get-Date -Format dd-M-yyy
function Write-Log {
    [CmdletBinding()]
    param(
        [Parameter()]
        [ValidateNotNullOrEmpty()]
        [string]$Message,
 
        [Parameter()]
        [ValidateNotNullOrEmpty()]
        [ValidateSet('Information','Warning','Error')]
        [string]$Severity = 'Information'
    )
 
    [pscustomobject]@{
        Time = (Get-Date -f g)
        Message = $Message
        Severity = $Severity
    } | Export-Csv -Path "C:\System\Scripts\PasswordExpiry\Log\LogFile_$($Date).csv" -Append -NoTypeInformation
 }
# Script Mode Test or Else
# If scriptmode is test, then the recipient is set to fish.marien@contoso.com
$ScriptMode = "Test"
$Type = "HTML"
$Save = "True"
$MesTitle = "Password expiry Notification"
$SearchOU = "OU=ICT,DC=contoso,DC=com"
Write-Log -Message "$($Date) Script Started" -Severity Information
# MGGraph Connection Parameters
$TenantID = "tenantid"
$ApplicationID = "applicationid"
$ApplicationSecret = "applicationSecret"
$Link = '<a href="https://myaccount.microsoft.com">MyAccount</a>'
# Convert the client secret to a secure string
$ClientSecretPass = ConvertTo-SecureString -String $ApplicationSecret -AsPlainText -Force
Write-Log -Message "Converting Application secret to secure string" -Severity Information
# Create a credential object using the client ID and secure string
$ClientSecretCredential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationID, $ClientSecretPass
Write-Log -Message "Creating Cloud credentials" -Severity Information
# Connect to Microsoft Graph with Client Secret
Write-Log "Connection to Mg Graph" -Severity Information
Connect-MgGraph -TenantId $TenantId -ClientSecretCredential $ClientSecretCredential
# Gettiong Target users
Write-Log -Message "Retrieving users from OU"
$TargetUsers = Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} -SearchBase $SearchOU –Properties "DisplayName", "msDS-UserPasswordExpiryTimeComputed", "Manager", "PwdLastSet", "AdminDescription" |
Select-Object -Property "Displayname",@{Name="ExpiryDate";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}, "Manager", "DistinguishedName"
$TargetUsersCount = ($TargetUsers | Measure-Object).Count
Write-Log -Message "Retrieved $($TargetUsersCount) users from OU: $($SearchOU)" -Severity Information
# Checking users which have a valid timestamp for Expiry date
$ValidatedUsers = $TargetUsers | Where-Object {$_.ExpiryDate -notlike "*1601*"}
$ValidatedUsersCount = ($ValidatedUsers | Measure-Object).Count
$UnvalidatedUsers = $TargetUsers | Where-Object {$_.ExpiryDate -like "*1601*"}
$UnvalidatedUsersCount = ($UnvalidatedUsers | Measure-Object).Count
Write-Log -Message "Retrieved $($UnvalidatedUsersCount) users, which are missing an ExpiryDate value. This users are not handled by the script" -Severity Warning
Write-Log -Message "Unvalidated users" -Severity Information
foreach ($obj in $UnvalidatedUsers) {
    Write-Log -Message "$($Obj.Name)" -Severity Information
}
Write-Log -Message "Retrieved $($ValidatedUsersCount) users, which are subject to the script" -Severity Information
foreach ($obj in $ValidatedUsers) {
    Write-Log -Message "$($Obj.Name)" -Severity Information
}
# retrieving the managers and peronalizing mail
Write-Log -Message "Getting validated users which password's will or has expired. Timeperiod = 21 days" -Severity Information
$Notify = $ValidatedUsers | Where-Object {$_.ExpiryDate -lt (Get-Date).AddDays(+21)}
Foreach ($Obj in $Notify) {
    if ($Obj.expirydate -lt (get-date)) {
        Write-Log -Message "The password of account $($Obj.name) has already expired" -Severity Information
        # Retrieving Manager info
        If ($null -eq $Obj.manager) {
            Write-Log -Message "The Account $($Obj.name) has no manager value defined, wherefore a mailconnect be send" -Severity Warning
            #$MesTitle = "The Password of account $($Obj.Name) has expired"
            $Body = 
@"
<p>Dear ServiceDesk,<br>
<br>
The password of account $($Obj.Name) has expired.<br>
The account does not have a manager specified wherefore the message is sent to the ServiceDesk.<br>
As the password has been expired, the account will no longer be able to log in.<br>
The account is located here: $($Obj.DistinguishedName)<br>
<br>
Kind Regards,<br>
<br>
ICT Systems<br></p>
"@
            If ($ScriptMode -eq "Test") {
                $Sender = "fish.marien@contoso.com"
                $Recipient = "fish.marien@contoso.com"
            }
            Else {
                $Sender = "ict-systems@contoso.com"
                $Recipient = "servicedesk@contoso.com"
            }
            $Params = @{
                Message = @{
                    Subject = $MesTitle
                    Body = @{
                        ContentType = $type
                        Content = $body
                    }
                    ToRecipients = @(
                        @{
                            EmailAddress = @{
                                Address = $recipient
                            }
                        }
                    )
                }
                SaveToSentItems = $save
            }
            Send-MgUserMail -UserId $Sender -BodyParameter $Params
            Write-Log -Message "$($Obj.Name) has no manager defvined, wherefore the message is sent to the ServicDesk" -Severity Information
        }
        Else {
            # Retrieving Manager
            $AdManagerObj = Get-ADUser $Obj.Manager -Properties Mail
            #$MesTitle = "Your Admin account's password has expired"
            If ($Null -eq $Obj.AdminDescription) {
            $Body = 
@"
<p>Dear $($AdManagerobj.GivenName),<br>
<p><br>
<p>The password of your admin account $($Obj.Name), has expired. Therefore you will no longer be able to use this account to log on.<br>
<p>You can reset the password via $($link), by logging in with your admin credentials.<br>
<p>After modifying the account's password, you will be able to use the account agaoin.<br>
<p><br>
<p>If you feel this mail is inappropriate, or does not apply to you, please contact the service desk for assistance.<br>
<p><br>
<p>Kind Regards,<br>
<p><br>
<p>ICT Systems<br>
"@
            }
            Else {
                $Body = 
@"
<p>Dear $($AdManagerObj.GivenName),<br>
<br>
<p>The password of your account $($Obj.Name), has expired. Therefore you will no longer be able to use this account to log on.<br>
<p>Please contact the ServiceDesk, they will create a support ticket and assign it to the propper team(s).<br>
<p><br>
If you feel this mail is inappropriate, or does not apply to you, please contact the ServiceDesk for assistance.<br>
<br>
Kind Regards,<br>
<br>
ICT Systems</p>
"@
            }
            If ($ScriptMode -eq "Test") {
                $Sender = "fish.marien@contoso.com"
                $Recipient = "fish.marien@contoso.com"
            }
            Else {
                $Sender = "ict-systems@contoso.com"
                $Recipient = $AdManagerObj.mail
            }
            $Params = @{
                Message = @{
                    Subject = $MesTitle
                    Body = @{
                        ContentType = $type
                        Content = $body
                    }
                    ToRecipients = @(
                        @{
                            EmailAddress = @{
                                Address = $recipient
                            }
                        }
                    )   
                }
                SaveToSentItems = $save
            }
            Send-MgUserMail -UserId $Sender -BodyParameter $Params
            Write-Log -Message "$($Obj.name) has a manager defined. The notification message was sent to $($ADManagerObj.Name)" -severity Information
        }
    }
    Else {
        # Calculating Days the password remains valid
        $EndDate = $Obj.ExpiryDate
        $StartDate = (Get-Date)
        $DaysToGo = New-Timespan -Start $StartDate -End $EndDate
        # Retrieving Manager
        $AdManagerObj = Get-ADUser $Obj.Manager -Properties Mail
        if ($Null -eq $Obj.AdminDescription) {
            $Body = 
@"
<p>Dear $($AdManagerObj.GivenName),<br>
<br>
The password of your admin account $($Obj.Name) will expire on $($Obj.ExpiryDate), which is wwithin $($DaysToGo.days) days.<br>
When the password has effectively has expired, you will no longer be able to use this account untill the password is updated.<br>
You can update the password via $Link, by logging in with your admin credentials.<br><br>
<br>
If you feel this mail is inappropriate, or does not apply to you, please contact the ServiceDesk for assistance.<br>
<br>
Kind Regards,<br>
<br>
ICT Systems</p>
"@
            Write-Log -Message "Users $($Obj.Name) is synced to Entgra AD" -Severity Information
        }
        Else {
            $Body = 
@"
<p>Dear $($AdManagerObj.GivenName),<br>
<br>
<p>The password of your admin account $($Obj.Name) will expire on $($Obj.expirydate), which is wwithin $($DaysToGo.days) days.<br>
<p>When the password has effectively has expired, you will no longer be able to use this account untill the password is updated.<br>
<p>Please update your admin's account password or contact the ServiceDesk for assistance, they will create a support ticket and assign it to the propper support team(s).<br>
<p><br>
<p>If you feel this mail is inappropriate, or does not apply to you, please contact the ServiceDesk for assistance.<br>
<p><br>
<p>Kind Regards,<br>
<p><br>
<p>ICT Systems</p>
"@
            Write-Log -Message "User $($Obj.Name) is not synced with Entra AD" -Severity Information
        }
        If ($ScriptMode -eq "Test") {
            $Sender = "fish.marien@contoso.com"
            $Recipient = "fish.marien@contoso.com"
        }
        Else {
            $Sender = "ict-systems@contoso.com"
            $Recipient = $AdManagerObj.mail
        }
        $Params = @{
            Message = @{
                Subject = $MesTitle
                Body = @{
                    ContentType = $type
                    Content = $body
                }
                ToRecipients = @(
                    @{
                        EmailAddress = @{
                            Address = $recipient
                        }
                    }
                )   
            }
            SaveToSentItems = $save
        }
        Send-MgUserMail -UserId $Sender -BodyParameter $Params
        Write-Log -Message "$($Obj.name) has a manager defined. The notification message was sent to $($ADManagerObj.Name)" -Severity Information
    }
}
Write-Log -Message "$($Date) Script ended" -Severity Information
Stop-Transcript

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 29, 2023, 8:29pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/12 "2023-09-29T20:29:00Z")

</div>

Of course I cannot reproduce your error because I don’t have your environment and I don’t even have all the code you’re using.

In your situation I’d try the following:

Instead of using variable substitution in strings I’d try to use the format operator `-f`.

So instead of

```auto
$Body = 
@"
<p>Dear $($AdManagerobj.GivenName),<br>
<p><br>
<p>The password of your admin account $($Obj.Name), has expired. Therefore you will no longer be able to use this account to log on.<br>
<p>You can reset the password via $($link), by logging in with your admin credentials.<br>
"@

```

I’d try this:

```auto
$Body = 
@'
<p>Dear {0},<br>
<p><br>
<p>The password of your admin account {1}, has expired. Therefore you will no longer be able to use this account to log on.<br>
<p>You can reset the password via {2}, by logging in with your admin credentials.<br>
'@ -f $($AdManagerobj.GivenName), $($Obj.Name), $($link)

```

If that does not help I’d try to put quotes around the variable name when called … so instead of

```auto
$Params = @{
    Message = @{
        Subject = $MesTitle
        Body = @{
            ContentType = $type
            Content = $body
        }
        ToRecipients = @(
            @{
                EmailAddress = @{
                    Address = $recipient
                }
            }
        )   
    }
    SaveToSentItems = $save
}

```

I’d call it like this:

```auto
$Params = @{
    Message = @{
        Subject = $MesTitle
        Body = @{
            ContentType = $type
            Content = "$body"
        }
        ToRecipients = @(
            @{
                EmailAddress = @{
                    Address = $recipient
                }
            }
        )   
    }
    SaveToSentItems = $save
}

```

Besides this I’d recommend considering refactoring your script to get rid of some repetitive code. I’d probably even “_outsource_” the HTML fragments into external files. For example PowerShell data files. This way you don’t have to deal with “_non PowerShell code_” inside your PowerShell scripts.

> **[about Data Files - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_data_files?view=powershell-7.3)**
>
> Describes how to use PowerShell data (.psd1) files.

> **[Import-PowerShellDataFile (Microsoft.PowerShell.Utility) - PowerShell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-powershelldatafile?view=powershell-7.3)**
>
> The Import-PowerShellDataFile cmdlet safely imports key-value pairs from hashtables defined in a .PSD1 file. The values could be imported using Invoke-Expression on the contents of the file. However, Invoke-Expression runs any code contained in the...

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [September 29, 2023, 10:45pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/13 "2023-09-29T22:45:34Z")

</div>

The variable should be in front of the @", not a line above it.

```auto
$Body = @"
<p>Dear $($AdManagerobj.GivenName),<br>
<p><br>
<p>The password of your account $($Obj.Name), has expired. Therefore you will no longer be able to use this account to log on.<br>
<p>You can reset the password via $($link), by logging in with your admin credentials.<br>
<p>After modifying the account's password, you will be able to use the account again.<br>
<p><br>
<p><br>
<p>Kind Regards,<br>
<p><br>
<p>ICT Systems<br>
"@

```

if this code by itself doesn’t cause an error, and you are getting an error in your entire script in this specific portion, then it means there is some unclosed quote/double quote prior to it. I would troubleshoot this by taking each little section of the script starting from the beginning into a new script. Add it and run, check for proper results or errors. Keep adding sections until you find the one that is causing you trouble.

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [September 29, 2023, 10:49pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/14 "2023-09-29T22:49:12Z")

</div>

> [@krzydoug](#):
>
> The variable should be in front of the @", not a line above it.

I think that detail does not make any difference. It works both ways. 😉

> [@krzydoug](#):
>
> if this code by itself doesn’t cause an error, and you are getting an error in your entire script in this specific portion, then it means there is some unclosed quote/double quote prior to it. I would troubleshoot this by taking each little section of the script starting from the beginning into a new script. Add it and run, check for proper results or errors. Keep adding sections until you find the one that is causing you trouble.

Amen to that. 🙏🏼🙂

---

<div class="post-metadata">

**Author:** ![krzydoug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/krzydoug/32/1008_2.png) [@krzydoug](https://forums.powershell.org/u/krzydoug)\
**Post date:** [September 29, 2023, 11:59pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/15 "2023-09-29T23:59:12Z")

</div>

> [@Olaf](#):
>
> I think that detail does not make any difference. It works both ways. 😉

Well it’s ugly 🙂

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:14pm UTC](https://forums.powershell.org/t/html-code-in-powershell-script/22931/16 "2024-05-16T20:14:37Z")

</div>

Closed on May 16, 2024, 8:14pm UTC


