Challenge:
There were scenario, where I was trying to get list of strings from text file and tried as below
[string[]]$ItemIdList = Get-Content -Path 'D:\ItemIds.txt'
but getting issue as file not found.
Approach to resolve:
With below lines of script, trying to first upload at temp/upload path (it will create directories if not exist).
And then reading list of strings from text file.
$dataFolder = [Sitecore.Configuration.Settings]::DataFolder
$tempFolder = $dataFolder + "\temp\upload"
$filePath = Receive-File -Path $tempFolder -overwrite'
[string[]]$ItemIdList = Get-Content -Path $filePath