0

I want to get Site URL using Keyword Query power shell..

Below are properties(b and lastmodifiedtime) im retrieving using keyword query ..likewise i want to get Site URL using below approach,how can i get?

Can anyone help me in this?

$keywordQuery.SelectProperties.Add("Created")
$keywordQuery.SelectProperties.Add("LastModifiedTime")

1 Answer 1

0

To get the current web URL, you can use the SPWebUrl managed property.

To get the current site collection, you can use the SPSiteUrl managed property.

So, append the below code as to your code:

$keywordQuery.SelectProperties.Add("SPWebUrl")  // to get SP Web Url
$keywordQuery.SelectProperties.Add("SPSiteUrl") // to get SP Site Url 
0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.