1

I have a current script which upload different .rdl files to my sharepoint site and in to different folder. E.g below:

It looks like this:

$spWeb = Get-SPWeb "mysite" 

$spList = $spWeb.Lists["Reports"]

$file = [io.file]::ReadAllBytes('D:\temp\test.rdl')

$spList.RootFolder.SubFolders["Test"].Files.Add("test.rdl",$file)

Now I would like to add data as well. E.g Datasource, Type, Credentials etc.

Anyone who can help me out?

Thank you.

1 Answer 1

0

get the item by file and update the metadata of the file

$tFile = $folder.Files.Add("test.rdl",$file)
$tItem=  $tFile.Item
$tItem["Title"]="title1"
$tItem.Update()
$tFile.Update()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.