{"id":116,"date":"2010-06-22T10:41:09","date_gmt":"2010-06-22T14:41:09","guid":{"rendered":"http:\/\/www.dontpapanic.com\/blog\/?p=116"},"modified":"2010-06-22T10:42:38","modified_gmt":"2010-06-22T14:42:38","slug":"disabling-the-silverlight-prompt-in-sharepoint-2010","status":"publish","type":"post","link":"https:\/\/www.dontpapanic.com\/blog\/?p=116","title":{"rendered":"Disabling the Silverlight Prompt in SharePoint 2010"},"content":{"rendered":"<p>Don\u2019t take the title of this post the wrong way.&#160; I think Silverlight is a wonderful addition to SharePoint 2010 Foundation and Server.&#160; After all, who would suggest that they really prefer the traditional user interface in screenshot 1 below, where the top half of the screen is taken up by instructions and a prompt to load Silverlight, over the Silverlight dialog interface in screenshot 2.&#160; Unfortunately, silverlight requires that a plugin be installed on each user\u2019s workstation and in some environments that is either problematic or forbidden by corporate policy.&#160; This post will explore one option for solving that problem.<\/p>\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"600\">\n<tbody>\n<tr>\n<td valign=\"top\" width=\"300\"><a href=\"http:\/\/www.dontpapanic.com\/blog\/images\/DisablingtheSilverlightPromptinSharePoin_9633\/NoSilverlight.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"NoSilverlight\" border=\"0\" alt=\"NoSilverlight\" src=\"http:\/\/www.dontpapanic.com\/blog\/images\/DisablingtheSilverlightPromptinSharePoin_9633\/NoSilverlight_thumb.png\" width=\"244\" height=\"150\" \/><\/a>                     <\/p>\n<h2>Screenshot1: No Silverlight<\/h2>\n<p><\/td>\n<td valign=\"top\" width=\"300\"><a href=\"http:\/\/www.dontpapanic.com\/blog\/images\/DisablingtheSilverlightPromptinSharePoin_9633\/Silverlight.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px\" title=\"Silverlight\" border=\"0\" alt=\"Silverlight\" src=\"http:\/\/www.dontpapanic.com\/blog\/images\/DisablingtheSilverlightPromptinSharePoin_9633\/Silverlight_thumb.png\" width=\"251\" height=\"150\" \/><\/a>                     <\/p>\n<h2>Screenshot2: Silverlight<\/h2>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I\u2019ve been working recently on building an external facing SharePoint site for a client.&#160; When we made the site available for internal users to test it we got reports back complaining about being prompted to install the Silverlight plugin.&#160; Some of our testers either didn\u2019t want to install Silverlight, or were on locked down workstations where they couldn\u2019t install Silverlight.&#160; Unfortunately, if they didn\u2019t install Silverlight they kept getting the nag prompt to install it every time they did something that required Silverlight.&#160; The client wanted a way to permanently remove the nag prompt so none of the external users were ever asked to install Silverlight.&#160; If they already had Silverlight installed that was fine, but this web site should never prompt them to do the install.<\/p>\n<p>In looking for a way to disable the prompt I found that the SPWebApplication object in SharePoint contains a property called AllowSilverlightPrompt.&#160; When this property is set to false users will not be prompted to load Silverlight if it isn\u2019t already installed.&#160; This setting isn\u2019t surfaced anywhere in Central Administration that I was able to discover.&#160; I also found that trying to set it from a Web Part or _layouts application page required raising the privileges of the impersonated user changing the setting.&#160; So in the end I decided to write some short PowerShell scripts that would handle changing the setting.&#160; I wrote both a script to display the current setting and one to change the setting.&#160; Let\u2019s look at the simple Get-SilverlightSetting.ps1 script first.<\/p>\n<div id=\"codeSnippetWrapper\">\n<div style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\" id=\"codeSnippet\">\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum1\">   1:<\/span> $webapp= $args[0]<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum2\">   2:<\/span> <span style=\"color: #0000ff\">if<\/span> ($webapp){$wa =  [microsoft.sharepoint.administration.spwebapplication]::lookup(<span style=\"color: #006080\">&quot;$webapp&quot;<\/span>)<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum3\">   3:<\/span> <span style=\"color: #0000ff\">if<\/span>($wa){<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum4\">   4:<\/span>     $switch = $wa.allowsilverlightprompt<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum5\">   5:<\/span>     <span style=\"color: #0000ff\">if<\/span> ($switch){<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum6\">   6:<\/span>         write-host <span style=\"color: #006080\">&quot;`nSilverlight Prompt &quot;<\/span> -nonewline;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum7\">   7:<\/span>         write-host <span style=\"color: #006080\">&quot;Enabled&quot;<\/span> -foregroundcolor red -nonewline;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum8\">   8:<\/span>         write-host <span style=\"color: #006080\">&quot; on $wa `n&quot;<\/span>;}<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum9\">   9:<\/span>     <span style=\"color: #0000ff\">else<\/span>{<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum10\">  10:<\/span>         write-host <span style=\"color: #006080\">&quot;`nSilverlight Prompt &quot;<\/span> -nonewline;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum11\">  11:<\/span>         write-host <span style=\"color: #006080\">&quot;Disabled&quot;<\/span> -foregroundcolor red -nonewline;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum12\">  12:<\/span>         write-host <span style=\"color: #006080\">&quot; on $wa `n&quot;<\/span>;}<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum13\">  13:<\/span> }<span style=\"color: #0000ff\">else<\/span>{<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum14\">  14:<\/span>     write-host <span style=\"color: #006080\">&quot;`nInvalid URL&quot;<\/span>; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum15\">  15:<\/span>     write-host <span style=\"color: #006080\">&quot;usage: get-silverlightsetting WebApplicationURL `n&quot;<\/span>}<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum16\">  16:<\/span> }<span style=\"color: #0000ff\">else<\/span>{<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum17\">  17:<\/span>     write-host <span style=\"color: #006080\">&quot;`nusage: get-silverlightsetting WebApplicationURL `n&quot;<\/span>}<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<p>This script checks in line 2 to see if you have passed a URL for a web application as a commandline parameter and prints out usage information in line 17 if you didn\u2019t.&#160; Line 2 then uses the URL to find a specific SPWebApplication object.&#160; If it can\u2019t find one then it prints out an error message and usage information in lines 14-15.&#160; If the web application is found it uses lines 6-8 to print that its enavled if the allowSilverlightPrompt is True.&#160; Otherwise it uses lines 10-12 to print that its disabled.&#160; This script just displays the current setting and makes no changes.&#160;&#160; (Note: the `n used in the write-host lines is an escaped newline character used in the script to format the output.) <\/p>\n<p>Now let\u2019s look at the Set-SilverlightSetting.ps1 script used to turn the silverlight prompt on or off.<\/p>\n<div id=\"codeSnippetWrapper\">\n<div style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\" id=\"codeSnippet\">\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum1\">   1:<\/span> $webapp= $args[0]<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum2\">   2:<\/span> $switch = $args[1]<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum3\">   3:<\/span> <span style=\"color: #0000ff\">if<\/span> ($webapp){<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum4\">   4:<\/span>     $wa =  [microsoft.sharepoint.administration.spwebapplication]::lookup(<span style=\"color: #006080\">&quot;$webapp&quot;<\/span>);<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum5\">   5:<\/span>     <span style=\"color: #0000ff\">if<\/span>($wa){<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum6\">   6:<\/span>         <span style=\"color: #0000ff\">if<\/span> ($switch -eq $<span style=\"color: #0000ff\">true<\/span>){<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum7\">   7:<\/span>             $wa.allowsilverlightprompt = $switch;$wa.update()}<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum8\">   8:<\/span>         <span style=\"color: #0000ff\">elseif<\/span> ($switch -eq $<span style=\"color: #0000ff\">false<\/span>){<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum9\">   9:<\/span>             $wa.allowsilverlightprompt = $switch;$wa.update()}<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum10\">  10:<\/span>         <span style=\"color: #0000ff\">else<\/span>{<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum11\">  11:<\/span>             write-host <span style=\"color: #006080\">&quot;`nMissing Switch&quot;<\/span>;<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum12\">  12:<\/span>             write-host <span style=\"color: #006080\">&quot;usage: set-silverlightsetting WebApplicationURL `$True|`$False`n&quot;<\/span>}<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum13\">  13:<\/span>     }<span style=\"color: #0000ff\">else<\/span>{<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum14\">  14:<\/span>         write-host <span style=\"color: #006080\">&quot;`nInvalid URL&quot;<\/span>; <\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum15\">  15:<\/span>         write-host <span style=\"color: #006080\">&quot;usage: set-silverlightsetting WebApplicationURL `$True|`$False`n&quot;<\/span>}<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum16\">  16:<\/span> }<span style=\"color: #0000ff\">else<\/span>{<\/pre>\n<p><!--CRLF--><\/p>\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\"><span style=\"color: #606060\" id=\"lnum17\">  17:<\/span>     write-host <span style=\"color: #006080\">&quot;`nusage: set-silverlightsetting WebApplicationURL `$True|`$False `n&quot;<\/span>}<\/pre>\n<p><!--CRLF--><\/div>\n<\/div>\n<p>This script is similar to the last one, but in line 2 it collects an extra commandline parameter representing whether the prompt should be turned on or off.&#160; If it finds the web application it uses the parameter supplied to turn the prompt on in line 7 or off in line 9.&#160; If the prompt is invalid an error message is printed using lines 11-12.&#160;&#160; To use the scripts simply open the SharePoint 2010 Managment Shell (be sure to remember to use run as Administrator when opening the shell) and run the following command line from wherever you have the scripts.<\/p>\n<div id=\"codeSnippetWrapper\">\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px\" id=\"codeSnippet\">.\\Set-SilverlightSetting <em>http:\/\/siteaddress<\/em> $False<\/pre>\n<p><\/div>\n<p>That will turn off the Silverlight prompt for all the sites on that Web Application.&#160; Once you\u2019ve done that screenshot #1 from above will look like this:<\/p>\n<p><a href=\"http:\/\/www.dontpapanic.com\/blog\/images\/DisablingtheSilverlightPromptinSharePoin_9633\/AfterSilverlight.png\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px\" title=\"AfterSilverlight\" border=\"0\" alt=\"AfterSilverlight\" align=\"left\" src=\"http:\/\/www.dontpapanic.com\/blog\/images\/DisablingtheSilverlightPromptinSharePoin_9633\/AfterSilverlight_thumb.png\" width=\"244\" height=\"150\" \/><\/a> <\/p>\n<p>I know it\u2019s not a huge change, but it does remove the annoying yellow bar that makes it look like there is something wrong with your site if you don\u2019t have Silverlight installed.&#160; I hope that helps for all of you who work with SharePoint where Silverlight can\u2019t be installed.&#160; <\/p>\n<p>For the rest of us\u2026. <\/p>\n<p>I suggest you just install Silverlight and enjoy the newer interface.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Don\u2019t take the title of this post the wrong way.&#160; I think Silverlight is a wonderful addition to SharePoint 2010 Foundation and Server.&#160; After all, who would suggest that they really prefer the traditional user interface in screenshot 1 below, where the top half of the screen is taken up by instructions and a prompt &hellip; <a href=\"https:\/\/www.dontpapanic.com\/blog\/?p=116\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Disabling the Silverlight Prompt in SharePoint 2010<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,33],"tags":[6,43,23],"class_list":["post-116","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2010","category-sharepoint-2010-dev","tag-sharepoint_2010","tag-silverlight","tag-tips"],"_links":{"self":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=116"}],"version-history":[{"count":1,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":117,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/116\/revisions\/117"}],"wp:attachment":[{"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dontpapanic.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}