Set-ManagedProperties -> Example

Jan 26, 2010 at 9:12 AM

Hello,

I have read this site with great interest. I have tried some script, they work fine.

But with the script Set-ManagedProperties I have problems. I would like to add 15 ManagedProperties to our farm, how can I do this.

Thanks for your answer,

Horst

Developer
Feb 9, 2010 at 4:11 PM

Hi Horst,

Sorry for the delay in getting back to you - what problems are you having with the script, exactly?

The easiest way to add 15 properties would probably be feeding them from a text file - an example of what the file should contain is actually contained within the script itself, as the default value for the -props input parameter.

Regards,

Sergey

Dec 5, 2011 at 3:25 PM

Example for the content of the text file "yourfilename.txt":

 

MyPropName:Text:ows_MyPropName:TRUE:

MyPropName2:Text:ows_MyPropName2:TRUE:

 

I found that you need to do an update after setting the EnabledForScoping property in the script, like so:

# Set the "Use in scopes" attributes using the value from input
$mprop.EnabledForScoping = $prhash.inscopes;
$mprop.Update();

 

Regards,

P