I’ve got quite a few scripts I run, remotely, locally, etc.
Is there any way to, on a line-by-line basis perhaps, supply an additional piece of info for a workstation, to be utilized in a script?
One example would be to pre-specify a string for a script to change the workstation description inside powershell.
Currently, i’ve got this in Get-Information:
cmd.exe /c echo . | powershell.exe -ExecutionPolicy Bypass -command “$x=gwmi win32_operatingsystem;$x.description=”[WORKSTATION DESCRIPTION HERE]”;$x.Put();”
It works, but it’s clunky as I’ve gotta rewrite the description every time. Ideally, a popup requesting the description would be handy. $x.description=”$input” or something.
Just looking for some best practice or suggestions. Thanks!