Skip to content

Instantly share code, notes, and snippets.

Avatar

Joerg Hochwald jhochwald

View GitHub Profile
@jhochwald
jhochwald / gist:71aab5fe0baaccc6d720
Created Mar 31, 2015
OneDrive for Business Mac (preview): A problem occurred while accessing the Office Document Cache. Do you want to repair this problem?
View gist:71aab5fe0baaccc6d720
#!/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`;
View Send-SlackChat.ps1
<#
{
"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."
View Send-HipChat.ps1
<#
{
"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 Dec 22, 2015
Disable Clutter for all Exchange Online (Office 365) Mailboxes in a
View Set-Clutter-disabled4all.ps1
<#
{
"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 Dec 22, 2015
PowerShell Tool to handle Tiny URLs
View UrlHandler.ps1
<#
{
"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."
View Create-ZIP.ps1
<#
{
"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 Jan 23, 2016
$MyInvocation vs. Sapien PowerShell Studio
View MyInvocation_vs_HostInvocation.ps1
<#
$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 Jan 29, 2016
A while ago I published some other functions for Chat and messaging, here is one for Pushover
View Send-Pushover.ps1
#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 Mar 19, 2016
Get all required Office365 Modules and Software from Microsoft
View Get-PreReqModules.ps1
#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 Mar 19, 2016
REGEX check to see if a given Email address is valid
View Approve-MailAddress.ps1
#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"