Get Site URL using Keyword query Search api
-
20-01-2021 - |
문제
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
제휴하지 않습니다 sharepoint.stackexchange