protected override void ExecuteCmdlet()
        {
            if (ParameterSetName == "Path")
            {
                if (!System.IO.Path.IsPathRooted(Path))
                {
                    Path = System.IO.Path.Combine(SessionState.Path.CurrentFileSystemLocation.Path, Path);
                }
                Configuration = System.IO.File.ReadAllText(Path);
            }
            switch (Scope)
            {
            case SearchConfigurationScope.Web:
            {
                CurrentWeb.DeleteSearchConfiguration(Configuration);
                break;
            }

            case SearchConfigurationScope.Site:
            {
                ClientContext.Site.DeleteSearchConfiguration(Configuration);
                break;
            }

            case SearchConfigurationScope.Subscription:
            {
                if (!ClientContext.Url.ToLower().Contains("-admin"))
                {
                    throw new InvalidOperationException(Resources.CurrentSiteIsNoTenantAdminSite);
                }

                ClientContext.DeleteSearchSettings(Configuration, SearchObjectLevel.SPSiteSubscription);
                break;
            }
            }
        }