Advertisement
private775

SharePoint: add jQuery CDN to site using PowerShell

Jun 4th, 2015
449
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $w = Get-SPWeb http://acme.com
  2. $uca = $w.UserCustomActions.Add()
  3. $uca.Name = "jQuery CDN"
  4. $uca.Location = "ScriptLink"
  5. $uca.ScriptBlock = "document.write('<script type=`"text/javascript`" src=`"//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js`"></' + 'script>');"
  6. $uca.Sequence = 111
  7. $uca.Update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement