Skip to content

Instantly share code, notes, and snippets.

View pencaster's full-sized avatar

Krum Haesli pencaster

View GitHub Profile
@pencaster
pencaster / gist:822744b0a68d06e1fc306f99de6be152
Created February 19, 2022 13:45
Tezos account tz1ga91q8RvuTV17U4J31ETJagSCVdW2bg2c for tzprofiles
I am attesting that this GitHub handle Pencaster is linked to the Tezos account tz1ga91q8RvuTV17U4J31ETJagSCVdW2bg2c for tzprofiles
sig:edsigtroGKRCjzX59TFDTKRELCBUAEiZkeNRh9Pdw75cnCrvgnmU5zeYuf6Q8qUfPcq5FcFpTe8BGFZFikocV65PqRiXhTLifvq
$head='<style>body{font-family:Calibri;font-size:10pt;}th{background-color:black;color:white;}td{background-color:#19fff0;color:black;}h4{margin-right: 0px; margin-bottom: 0px; margin-left: 0px;}</style>'
#Add SharePoint PowerShell Snap-In
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
#SharePoint Servers, use comma to separate.
$servers = @("xxxxx")
$servers = [array] ((Get-SPFarm).Servers | Select $_.Address
#===============#
# Server Report #
Add-PSSnapin Microsoft.SharePoint.PowerShell –ErrorAction SilentlyContinue
#Get Search service application
$ssa = Get-SPEnterpriseSearchServiceApplication
#Get the crawl status of the Search service application
Get-SPEnterpriseSearchCrawlContentSource -SearchApplication "Search Service Application" | select Name, CrawlStatus #Replace the default 'Search Service Application' name under '-SearchApplication' if different for your environment
#Disable continuous crawls for all content sources if enabled
$SSA = Get-SPEnterpriseSearchServiceApplication
$SPContentSources = $SSA | Get-SPEnterpriseSearchCrawlContentSource | WHERE {$_.Type -eq "SharePoint"}
foreach ($cs in $SPContentSources)
@pencaster
pencaster / gist:18f406b39e7f1c4db259459d953c95b5
Created May 10, 2021 14:18
SP-CreateContentSources.ps1
<#
Create Sharepoint 2013 Content Sources
Max Melcher (@maxmelcher), 2014
http://melcher.it
Use on your own risk
This script creates or updates SharePoint 2013 Search Content Sources and their schedules
#>
Configuration DeploySharePoint
{
param
(
[Parameter(Mandatory = $true)] [ValidateNotNullorEmpty()] [PSCredential] $InstallAccount,
[Parameter(Mandatory = $true)] [ValidateNotNullorEmpty()] [PSCredential] $WMRunAsCredential,
[Parameter(Mandatory = $true)] [ValidateNotNullorEmpty()] [PSCredential] $CertificatePassword
)
Import-DscResource -ModuleName ActiveDirectoryDsc
param(
[String]
$Site = "https://collaborationsp-tst.tstdom.dstbgrp.com/sites/SP2016/TEST",
[String]
$Lib="Documents",
[String]
$Group ="Visiteurs",
[String]
$Role="Lecture",
[String]
param(
[Parameter(Mandatory=$true, ValueFromPipeLine=$false)]
[String]
$permissionDataFile,
[String]
$delimiter = ";"
)
$ownerGroupName = "- Administrateur"
<# =====================================================================
## Title : Get-UlsLogs
## Description : This script will collect Individual ULS logs from specified servers or all servers in the farm. It will compress them into <servername>.zip files
## Authors : Jeremy Walker | Anthony Casillas
## Date : 11-14-2017
## Input :
## Output :
## Usage : .\Get-UlsLogs.ps1 -Servers "server1", "server2" -startTime "01/01/2017 11:30" -endTime "01/01/2017 14:30"
## Notes : If no '-Servers' switch is passed, it will grab ULS from all SP servers in the farm..
## Tag : ULS, Logging, Sharepoint, Powershell
##########################################################################
# SharePoint -- Export Site User Permissions to CSV
#
# Author : Krum Haesli
#
# Script to export all site user permissions
#
# *******************************************************************************
#
# Date created:2020-05-18 11:09:39
if((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null)
{
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
}
$StartTime = "05/19/2020 04:32:56 AM" # mm/dd/yyyy hh:mm:ss
$EndTime = "05/16/2020 05:42:58 AM"
$0 = $myInvocation.MyCommand.Definition
$env:dp0 = [System.IO.Path]::GetDirectoryName($0)
$currentDateAndTime = Get-Date -format "yyyy-MM-d_HH_mm_ss"
$thisComputer = ($env:computername).ToLower()