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
# Based on scripts at http://www.harbar.net/articles/sp2013mt.aspx | |
# Thanks Spence! | |
# Get App Pool | |
$saAppPoolName = "Default SharePoint Service App Pool" | |
# Search Specifics, we are single server farm | |
$searchServerName = (Get-ChildItem env:computername).value | |
$serviceAppName = "Search Service Application" | |
$searchDBName = "SearchService_DB" |
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
Remove-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue | |
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue | |
try | |
{ | |
$srcListSiteUrl = "https://sp.bizerba.com/sites/27261" | |
$SourceListName = "SiteMetadataPublic" | |
$dstListSiteUrl = "https://sp.bizerba.com/sites/27261" | |
$DestinationListName = "SiteMetadata" | |
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
using Microsoft.SharePoint.Client; | |
using Microsoft.SharePoint.Client.Taxonomy; | |
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Globalization; | |
using System.Linq; | |
namespace ICT.SharePoint.SPEvents.Events | |
{ |
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
function createListItem() { | |
var clientContext = new SP.ClientContext(_spPageContextInfo.siteAbsoluteUrl); | |
var oList = clientContext.get_web().get_lists().getByTitle('TestList'); | |
var itemCreateInfo = new SP.ListItemCreationInformation(); | |
this.oListItem = oList.addItem(itemCreateInfo); | |
//Single line of text | |
oListItem.set_item('Title', 'My New Item!'); | |
//Single Choice |
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
//Export Features ID, DisplayName | |
Get-SPFeature | select ID, DisplayName, Scope, CompatibilityLevel | Export-Csv c:\Features.csv | |
//Export all Features properties to CSV | |
get-SPFeature | Export-Csv c:\AllFeaturesProp.csv |
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
$LogTime = Get-Date -Format yyyy-MM-dd_hh-mm | |
$LogFile = ".\FeatureActivation-$LogTime.rtf" | |
cls | |
##================================================================================================ | |
## Description : Feature Activation Demo - | |
## Author : Sathish Nadarajan |
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
$Path = "cert:\localmachine\my" | |
$Certs = Get-ChildItem -path $Path | |
foreach ($cert in $Certs) | |
{ | |
#Get Folder-Informationen form Filessystem | |
$loop = $loop + 1; | |
foreach ($name in $cert.DnsNameList) | |
{ |
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
$Path = "C:\inetpub\wwwroot\static" | |
$Folders = Get-ChildItem -path $Path -Recurse -Include *.pfx | |
$pass = $mypwd = ConvertTo-SecureString -String "<Passwort>" -Force –AsPlainText | |
foreach ($file in $Folders) | |
{ | |
#Get Folder-Informationen form Filessystem | |
$loop = $loop + 1; | |
$sitefilepath = $file.Fullname |
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
$Path = "C:\inetpub\wwwroot\static" | |
$Folders = Get-ChildItem $Path -attributes D | |
$loop = 0 | |
foreach ($folder in $Folders) | |
{ | |
#Get Folder-Informationen form Filessystem | |
$loop = $loop + 1; | |
$sitefilepath = $folder.Fullname | |
$sitehostname = $folder.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
# Retrieve all available items | |
$allGalleryItems = Invoke-WebRequest -Uri "https://gallery.azure.com/Microsoft.Gallery/GalleryItems?api-version=2015-04-01&includePreview=true" | ConvertFrom-Json | |
# Get all items published by Microsoft | |
$allGalleryItems | Where-Object { $_.PublisherDisplayName -eq "Microsoft" } | |
# Get all gallery items with "SQL" in the description | |
$allGalleryItems | Where-Object { $_.Description -match "SQL" } | |
# Save default template for all items under directory "C:\Templates" |