Jump to content

DaveC-LHS

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral

About DaveC-LHS

Personal Information

  • Biography
    20+ years IT experience across Public, Private & Charity sectors. First role in Education sector.
  • Occupation
    IT Manager
  • Interests
    Reading, cooking, music
  • Location
    Reading
  1. Thanks @jthompson. I knew it would be something simple, but I had gone blind to it.
  2. Hi I am trying to write a PS script to create folders in a SharePoint document library using the content of an Import-CSV as a variable. The orginal script, PNP.Powershell Script to Create folders and set permissions via sharepoint/Teams, was failing so I've tried to rollback into the component parts of the script to find the issue. The following section of the script returns the correct values from the CSV. $libraryName = "" $folders=Import-csv "" # List of folders to create foreach ($folder in $folders) { $folder } However, changing the foreach statement to the following returns the $folder value as '@{folder=value}' as in (@{folder=value} \@{folder=value} does not exist. $libraryName = "" $folders=Import-csv "" foreach ($folder in $folders) { "$folder $libraryName\$folder does not exist" } Any help would be greatly appreciated.
×
×
  • Create New...