Scripts/Handig.ps1


Start-Process cleanmgr -ArgumentList "/sagerun:1 /VeryLowDisk /AUTOCLEAN"

Get-ChildItem $env:TEMP | Remove-Item -Recurse -Force -ea 0


Get-UserProfiles | Where-Object { $_.LastUseTime -lt (Get-Date).AddDays(-180) } | Remove-CimInstance


New-InboxRule -FromAddressContainsWords support@henkie.nl -MoveToFolder someone@somewhere.com:\Inbox\Automail -Name "support@henkie.nl"



$FilePath = ".\wiki-logo-wit.png"

$Base64 = [Convert]::ToBase64String((Get-Content $FilePath -AsByteStream))
$Base64
$HTML = "<img src=`"data:image/png; base64, $($Base64)`" />"
$HTML
$HTML | clip

$OutFilePath = "C:\Temp\test.png"
$Image = [Drawing.Bitmap]::FromStream([IO.MemoryStream][Convert]::FromBase64String($Base))
$Image.Save($OutFilePath)



[System.Environment]::SetEnvironmentVariable("DockerFolder", "$($env:Onedrive)\Docker", "Machine")