문제

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")
도움이 되었습니까?

해결책

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 
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top