powershell - Create desktop image to quickly identify a Server's purpose -
this background story think ask applicable wider scenarios:
i'm working on building deployment pipeline aws. aws instance id of vm , once login on desktop annotated text not useful. ec2 instance (vm) annotated tags express purpose each vm, somehow visualize information when loged in on server.
i'm not ops guy , i'm not used having many remote desktops open , remembering each does. big identifiable visible notation lot in opinion.
i've though couple of options focus on setting desktop wallpaper.
- when os windows server, use bginfo render text. convert tags text , use bginfo. output not distinguishable
- find api express concepts components or purpose , render picture. can't find one.
- use 1 of funny picture renders, text added on picture's placeholder. distinguishable kind of limited regards information density. example picture.
- i've thought generating badges example shields.io , combine them 1 image.
- i or better better aesthetics, creates couple of pictures represent possible components , combine bigger picture use source wallpaper.
all options require sort of big image rendering combining smaller quite laborious , i'm wondering if i'm missing or didn't query correct keywords on google on subject. people, work many vms on cloud setups, do? how identify purpose of vm or operating anywhere?
my question expects operating system ui available, because of requirement have visible, easy identify, marker. if have solution command line, please share also. i've though example modify powershell console status it's done git status. i'm focused on windows server operating systems if there unix based solution please share , maybe port idea.
after experimentation on subject aws ec2 instances implemented initial first approach on subject. not dynamic job me now.
i'm driving picture select (not generation) ec2 instance information. example tags or part of name.
then codedepploy package modify ec2wallpaper.jpg
located in appdata folder intended user. example administrator it's c:\users\administrator\appdata\local\ec2wallpaper.jpg
. because after analyzing happens on ec2 instance, realized there going race between code , 1 ec2launch
. so, aws's module ec2launch
it's job , set wallpaper enhanced information, chose modify original picture , let it's job.
# original wallpaper administrator user ec2launch tries modify (windows server 2016) upon logon $originalec2wallpaperpath="c:\users\administrator\appdata\local\ec2wallpaper.jpg" write-debug "originalec2wallpaperpath=$originalec2wallpaperpath" if(test-path $originalec2wallpaperpath) { # script decides wallpaper use , returns it's item # need decide on location. $getwallpaperitempath=join-path -path $psscriptroot -childpath "get-wallpaperitem.ps1" write-debug "getwallpaperitempath=$getwallpaperitempath" # execute get-wallpaperitem.ps1 $wallpaperitem=& $getwallpaperitempath if($wallpaperitem) { copy-item -path $originalec2wallpaperpath -destination "$($originalec2wallpaperpath).bak" write-verbose "copied $originalec2wallpaperpath $($originalec2wallpaperpath).bak" copy-item -path $wallpaperitem.fullname -destination $originalec2wallpaperpath -force write-verbose "copied $($wallpaperitem.fullname) $originalec2wallpaperpath" } else { write-warning "$getwallpaperitempath returned null item" } } else { write-debug "$originalec2wallpaperpath doesn't exist. not supported changing wallpaper via ec2launch" }
notice get-wallpaperitem.ps1
script responsible decide wallpaper use , return valid powershell item script. get-wallpaperitem.ps1
can use ec2's name, tags or other information decide picture use predetermined list, or generate picture somehow.
my original question addressing more dynamic part, enhancement me still. @ moment best options use imagemagick collate pre-rendered pictures , dynamic ones text canvas.
Comments
Post a Comment