Skip to content

Instantly share code, notes, and snippets.

View jhochwald's full-sized avatar
🤙

Joerg Hochwald jhochwald

🤙
View GitHub Profile
@jhochwald
jhochwald / gist:71aab5fe0baaccc6d720
Created March 31, 2015 08:18
OneDrive for Business Mac (preview): A problem occurred while accessing the Office Document Cache. Do you want to repair this problem?
#!/bin/bash
IFS=$'\n'
# Kill all running instances of OneDrive Business
killall -9 "OneDrive for Business" 2>/dev/null
killall -9 "OneDrive for Business" 2>/dev/null
# Find all stale caches
for i in `find ~/Library -name OfficeFileCache 2>/dev/null`;
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
},
"Copyright": "(c) 2012-2015 by Joerg Hochwald. All rights reserved."
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
},
"Copyright": "(c) 2012-2015 by Joerg Hochwald. All rights reserved."
@jhochwald
jhochwald / Set-Clutter-disabled4all.ps1
Last active December 22, 2015 13:42
Disable Clutter for all Exchange Online (Office 365) Mailboxes in a
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
},
"Copyright": "(c) 2012-2015 by Joerg Hochwald. All rights reserved."
@jhochwald
jhochwald / UrlHandler.ps1
Last active December 22, 2015 13:42
PowerShell Tool to handle Tiny URLs
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
},
"Copyright": "(c) 2012-2015 by Joerg Hochwald. All rights reserved."
@jhochwald
jhochwald / MyInvocation_vs_HostInvocation.ps1
Last active January 23, 2016 14:00
$MyInvocation vs. Sapien PowerShell Studio
<#
$MyInvocation vs. Sapien PowerShell Studio
Sorry, $MyInvocation is empty if you compile the Script!
This is a Workaround, that checks $host.Name and use
the Sapien Variant $HostInvocation instead.
#>
if ($host.Name -eq 'PrimalScriptHostImplementation') {
$Global:MyRunPath = (Split-Path -Parent $HostInvocation.MyCommand.Path)
$Global:MyScriptName = ($HostInvocation.mycommand.name)
@jhochwald
jhochwald / Send-Pushover.ps1
Created January 29, 2016 17:56
A while ago I published some other functions for Chat and messaging, here is one for Pushover
#region License
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
@jhochwald
jhochwald / Get-PreReqModules.ps1
Last active March 19, 2016 10:15
Get all required Office365 Modules and Software from Microsoft
#region License
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
@jhochwald
jhochwald / Approve-MailAddress.ps1
Created March 19, 2016 10:31
REGEX check to see if a given Email address is valid
#region License
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"
@jhochwald
jhochwald / Get-ServiceStatus.ps1
Created March 19, 2016 10:32
List Services where StartMode is AUTOMATIC that are NOT running
#region License
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "joerg.hochwald@outlook.com",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"