This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param | |
( | |
[Parameter(Mandatory=$true)] | |
[string]$siteurl, | |
[Parameter(Mandatory=$false)] | |
[bool]$OnlyThisSite | |
) | |
Function RemoveAllTimeStamps([Microsoft.SharePoint.SPSite] $site) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
This script can download slides, mp3, mp4 and high quality mp4 files from a Channel 9 RSS feed | |
Enter the feed like http://channel9.msdn.com/Events/SharePoint-Conference/2014. | |
This url can be found at the events homepage | |
.DESCRIPTION | |
The script itself will only print 'Hello World'. But that's cool. It's main objective is to show off the cool help thingy anyway. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-PSSnapin Microsoft.SharePoint.PowerShell | |
$app = Get-SPWebApplication -Identity <webapplicationurl> | |
$markup = @" | |
<div id='javascript-breadcrumb' class='ms-core-brandingText'></div> | |
<script> | |
this.elm = document.getElementById('javascript-breadcrumb'); | |
this.elm.innerHTML = _spPageContextInfo.webTitle; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
//Below method will Open the page in Popup | |
function OpenPopup(PageUrl) { | |
var options = SP.UI.$create_DialogOptions(); | |
options.title = "Services"; | |
// Setting the URL of the page to be opened in Popup | |
options.url = PageUrl; | |
// Setting Height and Width of the Popup | |
options.width = 750; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Type.registerNamespace('Arjan'); | |
Arjan.Demo = Arjan.Demo || {}; | |
Arjan.Demo.Templates = Arjan.Demo.Templates || {}; | |
Arjan.Demo.Functions = Arjan.Demo.Functions || {}; | |
Arjan.Demo.Templates.Header = function (context) { | |
return""; | |
} | |
Arjan.Demo.Templates.Footer = function (context) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Arjan.Demo.Templates.Item = function (context) { | |
var html = "<div faq='" + context.CurrentItem.Category + "' class='faqheader faqclose'>" + context.CurrentItem.Title; | |
html += "<div class='faqitem faqclose'>"; | |
html += context.CurrentItem.Answer; | |
html += "</div>" | |
html += "</div>" | |
return html | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Arjan.Demo.Templates.Group = function (context, group, groupId, listItem, listSchema, level, expand) { | |
html = '<div level="' + groupId + level + '" group="' + group + '" groupvalue="' + listItem[group] + '" class="faqlevel">' + listItem[group] + ' : </div>'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PolicyResource xmlns='urn:schemas-microsoft-com:office:server:policy' id='Test-Policy-Resource' featureId='Microsoft.Office.RecordsManagement.PolicyFeatures.Expiration' type='DateCalculator'> | |
<Name>Test-Policy-Resource</Name> | |
<Description>A custom policy that calculates the expiration date based at the status field</Description> | |
<AssemblyName>$assembly</AssemblyName> | |
<ClassName>$class</ClassName> | |
</PolicyResource> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$MicrosoftOfficePolicy = [System.Reflection.Assembly]::Load("Microsoft.Office.Policy, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c") | |
[Microsoft.Office.RecordsManagement.InformationPolicy.PolicyResource]::ValidateManifest($policyResource) | |
#try to delete | |
try | |
{ | |
[Microsoft.Office.RecordsManagement.InformationPolicy.PolicyResourceCollection]::Delete("Test-Policy-Resource") | |
} | |
catch{} | |
[Microsoft.Office.RecordsManagement.InformationPolicy.PolicyResourceCollection]::Add($policyResource) |
OlderNewer