I am trying to upload a bunch of files to a SharePoint server. But I want to set the file-metadata before uploading so that it matches with SharePoint property and buckets it. Need help in setting file-metadata by powershell/FSRM FCI SharePoint property is day, month, year. The SharePoint application is not installed on my system. So i don't have any access to the cmdlets/SharePoint management console. The source can be from local system win7 sp1/ remote system win 08 R2.
Currently using :
$webclient = New-Object System.Net.WebClient
$webClient.UseDefaultCredentials = $true
$webclient.UploadFile($destination + "/" + $file.Name, "PUT", $file.FullName)
Update from OP:
Sorry, don't have enough reputation to comment. But I don't think I explained my problem clearly.
Excel files contain a start-date and end-date column inside it. In order for my sharepoint server to group by Month and Year I need to ensure these properties are populated programmatically prior to upload.
I have achieved upload via calling powershell script on FSRM. e.g. Script1.ps1.
My approach: I defined a property 'Year' in classification properties and realised I will need a powershell classification rule. Saying if end-date > current_date then populate year(current_date) else year(end_date).Same with 'Month'. How to do this in powershell? Once this is done I will schedule both tasks one after the other. Thanks.