OK, this is starting to get me perturbed... I'm trying to use _resource~SystemIdentifier~MachineName of a system as a unique identifier so I can build a CSV file with which to configure a Sharepoint farm. Her is what I am getting as an error:
Checking if CSV exists...
Creating Temp Directory \\osfi-dml-01.devosfi.ca\Transient-Files\T2GrrTstDV0178
New-Item : The path is not of a legal form.
At C:\Users\darwin\AppData\Local\Temp\eca0aa7f-e761-4fc4-812c-029311dc8d04\task
.ps1:18 char:4
+ New-Item -ItemType Directory -Force -Path $TempPath -Name $RefDir
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (\\osfi-dml-01.d...ransient-Files\:String) [New-Item], ArgumentException
+ FullyQualifiedErrorId : CreateDirectoryArgumentError,Microsoft.PowerShell.Commands.NewItemCommand
---- SNIP ----
ABORT. Encountered error in Powershell.
Error while executing script: Process exited with an error: 1 (Exit value: 1)
I've tried using the variable directly ($ReferenceNost),
I've tried using the first item in the array (if it sees it): if ($ReferenceHost.count -gt 1) { $refHost = $ReferenceHost[0] } else { $refHost = $ReferenceHost }
I've tried taking the CR out of the string...
if I use Write-Output "--$ReferenceHost--" I get this:
--T2TstSQLBI0038
--
or sometimes this:
--T2TstSQLBI0038--
This is starting to drive me CRAZY... All I want to do is have a unique identifier with which to create a folder to house a god damn CSV file...
Suggestions??