Welcome › Forums › General PowerShell Q&A › PowerShell and SharePoint
How do I assign $User to my field ($item[“MySharePointName”])?
$User = Get-MsolUser -SearchString “test” | Select UserPrincipalName -ExpandProperty UserPrincipalName
The post is a bit vague. $item appears to be a HashTable, so emulating that $User returns ‘Foo’, you would assign it like this: