private775 icon

SharePoint: add jQuery CDN to site using PowerShell

private775 | PRO | 06/04/15 05:49:57 PM UTC | 0 ⭐ | 839 πŸ‘οΈ | Never ⏰ | []
PowerShell |

310 B

|

None

|

0 πŸ‘

/

0 πŸ‘Ž

$w = Get-SPWeb http://acme.com
$uca = $w.UserCustomActions.Add()
$uca.Name = "jQuery CDN"
$uca.Location = "ScriptLink"
$uca.ScriptBlock = "document.write('<script type=`"text/javascript`" src=`"//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js`"></' + 'script>');"
$uca.Sequence = 111
$uca.Update()

Comments