{"action":"opened","issue":{"url":"https://api.github.com/repos/SharePoint/PnP-PowerShell/issues/792","repository_url":"https://api.github.com/repos/SharePoint/PnP-PowerShell","labels_url":"https://api.github.com/repos/SharePoint/PnP-PowerShell/issues/792/labels{/name}","comments_url":"https://api.github.com/repos/SharePoint/PnP-PowerShell/issues/792/comments","events_url":"https://api.github.com/repos/SharePoint/PnP-PowerShell/issues/792/events","html_url":"https://github.com/SharePoint/PnP-PowerShell/issues/792","id":214416339,"number":792,"title":"Set-PnPSearchConfiguration not working on-premises","user":{"login":"CatoAntonsen","id":4197084,"avatar_url":"https://avatars3.githubusercontent.com/u/4197084?v=3","gravatar_id":"","url":"https://api.github.com/users/CatoAntonsen","html_url":"https://github.com/CatoAntonsen","followers_url":"https://api.github.com/users/CatoAntonsen/followers","following_url":"https://api.github.com/users/CatoAntonsen/following{/other_user}","gists_url":"https://api.github.com/users/CatoAntonsen/gists{/gist_id}","starred_url":"https://api.github.com/users/CatoAntonsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CatoAntonsen/subscriptions","organizations_url":"https://api.github.com/users/CatoAntonsen/orgs","repos_url":"https://api.github.com/users/CatoAntonsen/repos","events_url":"https://api.github.com/users/CatoAntonsen/events{/privacy}","received_events_url":"https://api.github.com/users/CatoAntonsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-15T14:56:39Z","updated_at":"2017-03-15T14:56:39Z","closed_at":null,"body":"### Reporting an Issue or Missing Feature\r\nIssue\r\n\r\n### Expected behavior \r\nI want to import tenant-level search configuration to my SP2013 on-prem farm.\r\n\r\n### Actual behavior \r\nI get errors:\r\n\r\n`Set-PnPSearchConfiguration : Current site is not a tenant administration site`\r\n\r\nand\r\n\r\n`Set-PnPSearchConfiguration : Illegal characters in path.`\r\n\r\nLook below for details.\r\n\r\n### Steps to reproduce behavior\r\n\r\n#### Issue 1: Tenant admin site has to have `-admin` in the url:\r\n```\r\n$adminUrl = http://portal/sites/admin\r\n$adminSite = Get-SPSite $adminUrl\r\n$adminSite.AdministrationSiteType = [Microsoft.SharePoint.SPAdministrationSiteType]::TenantAdministration\r\nConnect-PnPOnline -CurrentCredentials -Url $adminUrl\r\nSet-PnPSearchConfiguration -Path D:\\SearchConfig.xml -Scope Subscription\r\n\r\nError: \r\nSet-PnPSearchConfiguration : Current site is not a tenant administration site\r\n```\r\n\r\nIn the code I find this:\r\n```\r\nif (!ClientContext.Url.ToLower().Contains(\"-admin\"))\r\n{\r\n      throw new InvalidOperationException(Resources.CurrentSiteIsNoTenantAdminSite);\r\n}\r\n```\r\n\r\nSo you basically say that a tentant admin-side **has** to have `-admin` in the URL. I guess this would not be correct on-prem?\r\n\r\n#### Issue 2: Illegal characters:\r\n\r\nI thought I should be smart and created a new admin tenant site with the name `/sites/tenant-admin` and try again, I get a different error this time: \r\n\r\n `Set-PnPSearchConfiguration : Illegal characters in path.`\r\n\r\n### Which version of the PnP-PowerShell Cmdlets are you using?\r\n- [X] PnP PowerShell for SharePoint 2013\r\n- [ ] PnP PowerShell for SharePoint 2016\r\n- [ ] PnP PowerShell for SharePoint Online\r\n\r\n### What is the version of the Cmdlet module you are running?\r\nSharePointPnPPowerShell2013 2.13.1703.0\r\n\r\n### How did you install the PnP-PowerShell Cmdlets? \r\n- [X] MSI Installed downloaded from GitHub\r\n- [ ] Installed through the PowerShell Gallery with Install-Module\r\n- [ ] Other means\r\n\r\n"}}
{"actor":{"display_login":"CatoAntonsen"}}