Skip to content

Instantly share code, notes, and snippets.

Avatar

Rene Windegger rwindegger

View GitHub Profile
@rwindegger
rwindegger / users.txt
Created Sep 30, 2016
A list of Sharepoint Managed Accounts
View users.txt
"Name","Username"
"Access Service Application User","svc-SpFarmName-asa"
"Access Services 2010 User","svc-SpFarmName-as2"
"App Management Service User","svc-SpFarmName-ams"
"Businesss Data Connectivity Service User","svc-SpFarmName-bdcs"
"Excel Services User","svc-SpFarmName-es"
"Machine Translation Service User","svc-SpFarmName-mts"
"Managed Metadata Service User","svc-SpFarmName-mms"
"Performance Point Service User","svc-SpFarmName-pps"
"Search Service Application Service Acccount User","svc-SpFarmName-ssa"
@rwindegger
rwindegger / createusers.ps1
Created Sep 30, 2016
This file is used to create the active directory accounts based on a users.txt input file.
View createusers.ps1
Import-Module ActiveDirectory
$path = Split-Path -parent $MyInvocation.MyCommand.Definition
$importPath = $path + "users.txt"
# EDIT to fit your domain
$domain = "@yourdomain.local"
# EDIT to fit the ou you want to create your users in - make shure it exists
$location = "OU=SharePoint,OU=Service Users,OU=Users,DC=yourdomain,DC=local"
# EDIT to fit your password policy - otherwise creation will fail
$initialPass = ConvertTo-SecureString -AsPlainText "Pass@Word1" -force
@rwindegger
rwindegger / setupmanagedaccounts.ps1
Created Sep 30, 2016
This script sets up sharepoint managed accounts based on the users.txt input file.
View setupmanagedaccounts.ps1
$path = Split-Path -parent $MyInvocation.MyCommand.Definition
$importPath = $path + "users.txt"
# EDIT to match your net bios domain name.
$netBiosDomain = "corp"
# EDIT adjust to your schedule needs
$schedule = "weekly at Sun 12:00"
# EDIT you need to adjust the password to match the password in createusers.ps1.
$initialPass = ConvertTo-SecureString -AsPlainText "Passw0rd!" -force
Import-CSV $importPath | ForEach-Object {
$sam = $_.Username.ToLower()
@rwindegger
rwindegger / IEnvironmentBuilder.cs
Created Sep 30, 2016
Interface for environment builder.
View IEnvironmentBuilder.cs
/// @license <![CDATA[Copyright © windegger.wtf 2016
///
/// Unauthorized copying of this file, via any medium is strictly
/// prohibited
///
/// Proprietary and confidential
///
/// Written by Rene Windegger <rene@windegger.wtf> on 23.02.2016]]>
/// @file Diagnostics\IEnvironmentBuilder.cs
/// Declares the IEnvironmentBuilder interface.
@rwindegger
rwindegger / BaseProcess.cs
Created Sep 30, 2016
Implements the base process class
View BaseProcess.cs
/// @license <![CDATA[Copyright © windegger.wtf 2016
///
/// Unauthorized copying of this file, via any medium is strictly
/// prohibited
///
/// Proprietary and confidential
///
/// Written by Rene Windegger <rene@windegger.wtf> on 24.02.2016]]>
/// @file Diagnostics\BaseProcess.cs
/// Implements the base process class.
@rwindegger
rwindegger / LimitedConcurrencyTaskScheduler.cs
Last active Oct 1, 2016
Implements the limited concurrency task scheduler class.
View LimitedConcurrencyTaskScheduler.cs
/// @license <![CDATA[Copyright © windegger.wtf 2016
///
/// Unauthorized copying of this file, via any medium is strictly
/// prohibited
///
/// Proprietary and confidential
///
/// Written by Rene Windegger <rene@windegger.wtf> on 23.02.2016]]>
/// @file Threading\LimitedConcurrencyTaskScheduler.cs
/// Implements the limited concurrency task scheduler class.
View Greeter.cs
namespace at.automism.FriendlyAssemblies.Secret
{
using System;
using System.Collections.Generic;
using System.Linq;
public static class Greeter
{
public static void SayHello()
{
View generatesnk.bat
sn -k at.automism.FriendlyAssemblies.snk
sn -p at.automism.FriendlyAssemblies.snk at.automism.FriendlyAssemblies.pk
sn -tp at.automism.FriendlyAssemblies.pk > at.automism.FriendlyAssemblies.txt
View InternalsVisibleTo.cs
[assembly: InternalsVisibleTo("at.automism.FriendlyAssemblies.Consumer, PublicKey=002400000480000094000000060200000024000052534131000400000100010057950ce02d1832b52cb36a7eeee66218d2611176a0e430082db23d4aaa50ed3028d73be065c3f2877072ffa38737badc988c9192316da6197062c8b4908d441a693454493f260c86c911ecf0189934093d0823a8f4180053afa6e57df10b3ddca27c6237bb1afa59db5e9578d607378e512557f4fb83a8faa60f497aee4801d4")]
View Anouncer.cs
namespace at.automism.FriendlyAssemblies.Public
{
using at.automism.FriendlyAssemblies.Secret;
using System;
using System.Collections.Generic;
using System.Linq;
public static class Anouncer
{
public static void Anounce()
You can’t perform that action at this time.