Skip to content

Instantly share code, notes, and snippets.

<#

.SYNOPSIS

 Short description of the function or script.

.DESCRIPTION
 Elaborate description of the function or script.

.PARAMETER

#Evernote Searches & Tips

Searches

All notes whit no reminder set to them

-reminderorder:*

All notes without Tags

-tag:*

Todoist Shortcuts, filters and searches

Generate a temporary file name

>  [System.IO.Path]::GetTempFileName()

Resolve a host name to it's FQDN

>  [system.net.dns]::resolve($env:computername)

>  [system.net.dns]::resolve($env:computername).host  #Return the FQDN only

Assign PowerShell Console rights on all SharePoint Content databases

> foreach($db in get-spcontentdatabase) {add-spShellAdmin -username <account> -database $db.id}

On windows 2012 R2 frequently have errors trying to install .Net FrameWork 3.5. The following command, run in elavated cmd box, installs it offline.

dism /online /enable-feature /featurename:netfx /all /source::\sources\sxs /LimitAccess

[Microsoft Technet Information] (https://support.microsoft.com/en-us/kb/2734782#/en-us/kb/2734782) .Net Framework 3.5 installation error: 0x800F0906, 0x800f081f, 0x800f0907

@BartVandyck
BartVandyck / 0_reuse_code.js
Created December 10, 2015 07:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

#TodoIst Power Filters

A list of some Power Filters I use with Todoist ( https://todoist.com )

Filters

Waiting overdue

All tasks labelled "Waiting" and a due date that has passed or is today

@waiting & (overdue, today)
@BartVandyck
BartVandyck / posh-CheckSPModule
Created November 1, 2013 16:41
PowerShell snippet to check if the SharePoint module is already loaded. If not load it.
if (-not$(Get-pssnapin Microsoft.SharePoint.PowerShell -erroraction "SilentlyContinue")) {Add-PSSnapin Microsoft.SharePoint.PowerShell}