【发布时间】:2021-01-15 23:19:51
【问题描述】:
我正在尝试使用 PowerShell 解析 SharePoint 网站中使用的标识名称。
请求很简单:
(Invoke-WebRequest -Uri https://<siteaddress>/_api/web/SiteLogoUrl -UseDefaultCredentials).content
生成xml
<?xml version="1.0" encoding="utf-8"?>
<d:SiteLogoUrl xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"
xmlns:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml">/<sitepath>/SiteAssets/Logo_name.jpg</d:SiteLogoUrl>
但是,尝试将其转换为 XML 只会创建“空”数据
[xml]((Invoke-WebRequest -Uri https://<siteaddress>/_api/web/SiteLogoUrl -UseDefaultCredentials).Content).SiteLogoUrl
【问题讨论】:
标签: xml powershell rest sharepoint