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')


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

Anyone who can help me out?

Thank you.


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

$tFile = $folder.Files.Add("test.rdl",$file)
$tItem=  $tFile.Item

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.