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`;
@jhochwald
jhochwald / JSON_Config.ps1
Last active August 9, 2024 13:37
How to use a JSON based config file with PowerShell Modules or Scripts
<#
{
"info": {
"Statement": "Code is poetry",
"Author": "Joerg Hochwald",
"Contact": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"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": "[email protected]",
"Link": "http://hochwald.net",
"Support": "https://github.com/jhochwald/MyPowerShellStuff/issues"