I have code that gets all the items of a SP list and export it to CSV. In the code below I have specify the column called "00:00 - 07:59". But it doesn't work because the columns name got spaces in it. I could use the InternalName but I don't want that. Is it possible to get the name of a column that has spaces in it?

$ExportItem | Add-Member -MemberType NoteProperty -name "00:00 - 07:59" -value $_["00:00 - 07:59"]

Greetings, P


In SharePoint powershell are always used InternalNames of Fields. If you want to export these properties, try create own Object with defined fields and names and insert into values, here you can use InternalNames and it will be user-friendly.

If you want more help, provide rest of the code for opportunity to change it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.