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
var webUrl = "newSubSite", | |
webTitle = "New Sub Site", | |
webDesc = "Description about the new web/site"; | |
var siteTemplate; | |
var CONST_PROJECT_TEMPLATE = "Custom Project Template"; | |
var ctx = SP.ClientContext.get_current(); | |
var webTemplates = ctx.get_web().getAvailableWebTemplates(1033, false); | |
ctx.load(webTemplates); |
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
SP.SOD.executeFunc('SP.js', 'SP.ClientContext', function() { | |
var clientContext = new SP.ClientContext.get_current(); | |
var web = clientContext.get_web(); | |
var rootFolder = web.get_rootFolder(); | |
clientContext.load(rootFolder); | |
clientContext.executeQueryAsync(function() { | |
console.log("WebWelcome Page is: " + rootFolder.get_welcomePage()); |
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
#MAKE SURE YOU ARE CONNECTED TO OFFICE 365 BEFORE RUNNING THIS SCRIPT | |
#If you don't know how check out: http://powershell.office.com/script-samples/connect-to-Azure-AD | |
#The initial script was built for Yammer removal by Vlad Catrinescu and can be found here: http://spvlad.com/1VXll7f | |
#Updated by Drew Madelung to support O365 Planner GA | |
#This script will go through all licensed users and first check if they have the planner preview license and remove it and then check for the GA O365 planner license and disable it | |
#This script will re-enable all other services EXCEPT planner, If you want to disable more add them comma seaparated to the $disabledplans variable. | |
#For example to disable Yammer and Planner use this: $disableplans = "PROJECTWORKMANAGEMENT", "YAMMER_ENTERPRISE" | |
#Set disabled plans (only Planner to start) | |
$disableplans = "PROJECTWORKMANAGEMENT" |
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
# Login and select Azure Subscription. | |
Login-AzureRmAccount -TenantId db87e8a4-ab1f-4a72-844d-f9ad89ad4258 | |
Select-AzureRmSubscription -SubscriptionId 72e4639f-8f07-45c5-9347-9e3dd84691db | |
# Get all Azure VM's in subscription so they can be added to drop down list. | |
$listvms = Get-AzureRmVM | |
$extractvmname = $listvms.Name | |
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
USE master; | |
Go | |
SELECT 'DROP DATABASE '+ name | |
FROM sys.databases WHERE name like 'sp16%'; | |
GO |
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
// A $( document ).ready() block. | |
$( document ).ready(function() { | |
console.log( "ready!" ); | |
var itemId = getUrlParameter("EventId"); | |
setLookupValue("Schulung_x002f_Unterweisung_6a5704d6-f2e4-46f4-9cf6-834e47e66d77_\\$LookupField", itemId); | |
$("select[id=Schulung_x002f_Unterweisung_6a5704d6-f2e4-46f4-9cf6-834e47e66d77_\\$LookupField]").change(checkBooking); | |
$("select[id=Schulung_x002f_Unterweisung_6a5704d6-f2e4-46f4-9cf6-834e47e66d77_\\$LookupField]").trigger( "change" ); | |
}) |
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 -ErrorAction SilentlyContinue | |
# assume your farm account is managed account | |
$FarmSvcAccountName = "AD\YourFarmServiceAccount" | |
$FarmSvcAccount= (Get-SPManagedAccount $FarmSvcAccountName) | |
$DatabaseServer = "YourDBServer" | |
$AppServer = "YourAppServer" | |
$MySitePort = 85 | |
$MySiteUrl="http://{0}:{1}" -f $AppServer, $MySitePort |
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
$programFiles = [environment]::getfolderpath("programfiles") | |
add-type -Path $programFiles'\SharePoint Online Management Shell\' + ` | |
'Microsoft.Online.SharePoint.PowerShell\Microsoft.SharePoint.Client.dll' | |
Write-Host ` | |
'To enable SharePoint app sideLoading, ' + ` | |
'enter Site Url, username and password' | |
$siteurl = Read-Host 'Site Url' |
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
[reflection.assembly]::loadwithpartialname("Microsoft.SharePoint") | |
$cs = [microsoft.sharepoint.administration.spwebservice]::ContentService | |
$global:largeListThreshhold = 2000 | |
function Is-Admin([Microsoft.SharePoint.SPRoleAssignment]$roleAssignment) | |
{ | |
return (($roleAssignment.roledefinitionbindings | where { ($_.BasePermissions.ToString() -match "ManageLists|ManageWeb|FullMask") }) -ne $null) | |
} | |
function Write-ListDetails($list,$web,$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
if((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null) | |
{ | |
Add-PSSnapin Microsoft.SharePoint.PowerShell; | |
} | |
$web = Get-SPWeb "http://YourWeb/sites/" | |
$list = $web.Lists["OLD Name"] | |
# Display the fields, so to make sure you are grabbing the correct list in the correct site collection |