Last active
November 9, 2017 09:34
-
-
Save bazzilic/859f95946ac4ecd306b6406cc9f8d8fa to your computer and use it in GitHub Desktop.
Put hostname and some server information on the background of a Windows server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# iex ((New-Object System.Net.WebClient).DownloadString('https://gist.github.com/bazzilic/859f95946ac4ecd306b6406cc9f8d8fa/raw/020730d36e6b8517466334e715116467d4f2aa7d/Set-WinSrvBackground.ps1')) | |
New-TemporaryFile | ` | |
% { iwr -Uri https://download.sysinternals.com/files/BGInfo.zip -OutFile $_.FullName ; ` | |
mv $_.FullName "$($_.FullName).zip" ; ` | |
"$($_.FullName).zip" } | ` | |
% { Expand-Archive -Path $_ -DestinationPath ~/bginfo/ -Force } | |
New-TemporaryFile | ` | |
% { iwr -Uri https://gist.github.com/bazzilic/859f95946ac4ecd306b6406cc9f8d8fa/raw/1c9b6b02663850d04c2f007d7b51a2ebda592f70/x.bgi -OutFile "$($_.FullName).bgi" ; ` | |
~/bginfo/bginfo64 "$($_.FullName).bgi" /timer 0 /silent /nolicprompt ; | |
Start-Sleep -s 1 ; | |
rmdir -force -recurse ~/bginfo } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment