Skip to content

Instantly share code, notes, and snippets.

View janikvonrotz's full-sized avatar
:octocat:

Janik von Rotz janikvonrotz

:octocat:
View GitHub Profile
@janikvonrotz
janikvonrotz / Add-SPWebAppMimeType.ps1
Created June 25, 2013 11:27
PowerShell: Set Browser File Handling For SharePoint Webapplication #PowerShell #SharePoint
# get all webapplications
$SPWebApps = Get-SPWebApplication
# set browser mime type
$mimeType = "application/pdf"
$SPWebApps | foreach-object {
# If the MIME Type is not already on the allowed list for the Web Application
if(!$_.AllowedInlineDownloadedMimeTypes.Contains($mimeType)){
@janikvonrotz
janikvonrotz / IE10MobileResponsiveFix.js
Created July 2, 2013 12:44
IEMobile 10 responsive fix #JavaScript #WordPress
/**
* IEMobile responsive fix
*/
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
var msViewportStyle = document.createElement("style");
msViewportStyle.appendChild(
document.createTextNode(
"@-ms-viewport{width:auto!important}"
)
@janikvonrotz
janikvonrotz / TouchSupportedNavigation.js
Created August 5, 2013 05:57
Touch Supported Navigation #JavaScript #WordPress
/* open dropdown navigation on touch devices */
jQuery('.touch nav').on('click','ul.nav>li:not(.active)',function(event){
if(jQuery(this).find('ul').length > 0){
event.preventDefault();
jQuery('.overlay').show();
jQuery(this).siblings().removeClass('active');
jQuery(this).addClass('active');
}else{
jQuery(this).siblings().removeClass('active');
jQuery('.overlay').hide();
@janikvonrotz
janikvonrotz / ActiveDirectory.mail.config.xml
Last active July 8, 2016 15:23
PowerShell: Send Password Expiration Reminder#PowerShell#ActiveDirectory
<?xml version="1.0" encoding="utf-8"?>
<Content>
<Metadata>
<Title>PowerShell Profile Mail Configuration</Title>
<Filename>DirSync.mail.config.xml</Filename>
<Description></Description>
<Tags>powershell, profile, mail, configuration</Tags>
<Project></Project>
<Author>Janik von Rotz</Author>
@janikvonrotz
janikvonrotz / Office365 License Management.task.config.xml
Last active January 26, 2018 21:26
PowerShell: Set Office365 Licenses by ActiveDirectory Group Membership #ActiveDirectory #PowerShell #Office365
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2013-03-20T14:18:21.6393172</Date>
<Author>Janik von Rotz (www.janikvonrotz.ch)</Author>
<Description>Office365 License Management</Description>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2013-01-01T02:30:00</StartBoundary>
@janikvonrotz
janikvonrotz / Replace-SPRoleAssignment.ps1
Last active March 18, 2020 16:34
PowerShell: Replace SharePoint Role Assignments #PowerShell #SharePoint
$Metadata = @{
Title = "Replace SharePoint Role Assignments"
Filename = "Replace-SPRoleSsignment.ps1"
Description = ""
Tags = "powershell, sharepoint, role, assignment"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "http://janikvonrotz.ch"
CreateDate = "2013-05-17"
LastEditDate = "2013-05-17"
@janikvonrotz
janikvonrotz / SharePoint2013PatchInstall.ps1
Created August 14, 2013 06:25
PowerShell: SharePoint 2013 Patch Installation #SharePoint #PowerShell
<#
$Metadata = @{
Title = "SharePoint 2013 Patch Installation"
Filename = "SharePoint2013PatchInstall.ps1"
Description = "Install the cumulative update in less the time you'll do it manually"
Tags = "sharepoint, powershell, 2013, cumulative, update"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "http://janikvonrotz.ch"
CreateDate = "2013-06-24"
@janikvonrotz
janikvonrotz / New-ADUsers.ps1
Created August 16, 2013 07:06
PowerShell: Create new ActiveDirectory users #ActiveDirectory #PowerShell
<#
$Metadata = @{
Title = "Create new ActiveDirectory users"
Filename = "New-ADUsers.ps1"
Description = ""
Tags = "powershell, activedirectory, user"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "http://janikvonrotz.ch"
CreateDate = "2013-08-16"
@janikvonrotz
janikvonrotz / Update-ADUsers.ps1
Created August 16, 2013 07:07
PowerShell: Update ActiveDirectory users #PowerShell #ActiveDirectory
<#
$Metadata = @{
Title = "Update ActiveDirectory users"
Filename = "Update-ADUsers.ps1"
Description = ""
Tags = "powershell, activedirectory, user, update"
Project = ""
Author = "Janik von Rotz"
AuthorContact = "http://janikvonrotz.ch"
CreateDate = "2013-08-16"
@janikvonrotz
janikvonrotz / Exchange Online Settings.task.config.xml
Last active December 21, 2015 10:49
PowerShell: Set Exchange OnlineConfigurations #PowerShell #ExchangeOnline #Office365
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2013-03-20T14:18:21.6393172</Date>
<Author>Janik von Rotz (www.janikvonrotz.ch)</Author>
<Description>Exchange Online Settings</Description>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2013-01-01T03:00:00</StartBoundary>