I'd suggest to check out the following site, as they are doing something similar. It looks like from what I'm saying it may be determinate on what your object is -- in this case -- they had it seperated out as a string. Have you tried to check what those output as you were debugging?
See below, from site,
function New-SPList {
<#
.Synopsis
Use New-SPList to create a new SharePoint List or Library.
.Description
This advanced PowerShell function uses the Add method of a SPWeb object to create new lists and libraries in a SharePoint Web
specified in the -Web parameter.
.Example
C:\PS>New-SPList -Web http://intranet -ListTitle "My Documents" -ListUrl "MyDocuments" -Description "This is my library" -Template "Document Library"
This example creates a standard Document Library in the http://intranet site.
.Example
C:\PS>New-SPList -Web http://intranet -ListTitle "My Announcements" -ListUrl "MyAnnouncements" -Description "These are company-wide announcements." -Template "Announcements"
This example creates an Announcements list in the http://intranet site.
.Notes
You must use the 'friendly' name for the type of list or library. To retrieve the available Library Templates, use Get-SPListTemplates.
.Link
http://www.iccblogs.com/blogs/rdennis
http://twitter.com/SharePointRyan
.Inputs
None
.Outputs
None
#>
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string]$Web,
[Parameter(Mandatory=$true)]
[string]$ListTitle,
[Parameter(Mandatory=$true)]
[string]$ListUrl,
[Parameter(Mandatory=$false)]
[string]$Description,
[Parameter(Mandatory=$true)]
[string]$Template
)
Start-SPAssignment -Global
$SPWeb = Get-SPWeb -Identity $Web
$listTemplate = $SPWeb.ListTemplates[$Template]
$SPWeb.Lists.Add($ListUrl,$Description,$listTemplate)
$list = $SPWeb.Lists[$ListUrl]
$list.Title = $ListTitle
$list.Update()
$SPWeb.Dispose()
Stop-SPAssignment -Global
}
$webTemplate = "Document Library"$line.Url = "processes"; $line.Description = ""; $line.Library = "Process Documenation";