# Appending the title property of a variable to this string?

**URL:** <https://forums.powershell.org/t/appending-the-title-property-of-a-variable-to-this-string/17098>\
**Category:** PowerShell Help\
**Created:** [July 15, 2021, 9:05pm UTC](https://forums.powershell.org/t/appending-the-title-property-of-a-variable-to-this-string/17098 "2021-07-15T21:05:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![powershelluser1267](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@powershelluser1267](https://forums.powershell.org/u/powershelluser1267)\
**Post date:** [July 15, 2021, 9:05pm UTC](https://forums.powershell.org/t/appending-the-title-property-of-a-variable-to-this-string/17098/1 "2021-07-15T21:05:46Z")

</div>

I may be using the wrong terminology here, please beer with me.

I have an RSS Feed link here. I’ve run it against `Invoke-RestMethod` and stored it in a variable called `$Feed`.

If I run :

```auto
$feed | Format-Table -Property Title, Link

```

I get the data presented nicely like this:

[![enter image description here](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/2X/b/b8e41a1c5673e3bf7dda58a9cc767649ee00e456.jpeg)](https://i.stack.imgur.com/u05KB.jpg)

I would like to print out the all the Titles on the Terminal Prefixing the string `Article Name is:` . One article per line. For example:

```auto
Article Name is: Fan Art Can Be a Good Thing 

```

Here is what I have so far.

```auto
$feed = Invoke-RestMethod https://www.muddycolors.com/feed/
$feed | ForEach-Object {"Article Name is: $_.Title"}

```

Terminal Outputs:

```auto
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title
Article Name is: System.Xml.XmlElement.Title

```

What could I be doing wrong? Any help would be appreciated.

---

<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:** [July 16, 2021, 7:56am UTC](https://forums.powershell.org/t/appending-the-title-property-of-a-variable-to-this-string/17098/2 "2021-07-16T07:56:36Z")

</div>

> [@powershelluser1267](#):
>
> What could I be doing wrong? Any help would be appreciated.

If you place your variable you want to expand in quotes you need a subexpression to expand it properly:

```auto
$feed | ForEach-Object {"Article Name is: $($_.Title)"}

```

---

<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:23pm UTC](https://forums.powershell.org/t/appending-the-title-property-of-a-variable-to-this-string/17098/3 "2024-05-16T20:23:47Z")

</div>


