Skip to content

Instantly share code, notes, and snippets.

@siamware
siamware / Office_kms
Created July 13, 2019 07:07 — forked from CHEF-KOCH/KMS_office.cmd
KMS server Windows
cd\Program Files\Microsoft Office\Office16
cd\Program Files (x86)\Microsoft Office\Office16
cscript OSPP.VBS /sethst:kms.digiboy.ir
cscript OSPP.VBS /actcscript OSPP.VBS /dstatus
slmgr.vbs /ckms
@turibbio
turibbio / WriteFormattedOutput.ps1
Created August 18, 2015 23:08
Write colored output with Powershell cmdlet Write-Output
function Write-FormattedOutput
{
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1,ValueFromPipeline=$True,ValueFromPipelinebyPropertyName=$True)][Object] $Object,
[Parameter(Mandatory=$False)][ConsoleColor] $BackgroundColor,
[Parameter(Mandatory=$False)][ConsoleColor] $ForegroundColor
)
# save the current color