Hey @Sebastian-Roth I will see what I can do! I am definitely not a developer so it will be slow going while I try to figure things out but I would be happy to try to contribute to FOG.
Best posts made by mckay
-
RE: Repurpose the restart notification to work for running/delaying Snapins
-
RE: Need a way to pass variables in Powershell using hostname, primary user, other tag #1 or other tag #2
Hey @Daniel-Miller and @george1421 thanks again for your effort in helping me figure this out. I think the complexity (for me) for what I was about to do scared me into thinking of a roundabout approach to solving this issue. I think I found a better solution than what I was originally trying to do (and WAY simpler). I will post here in case this will be of use for anyone in the future.
Rather than appending a date to the hostname so I can change the computer name I decided to start out with the date appended to the hostname so that renaming the computer would be exactly how I want it to be then for my other requirements (adding the user to be admin of the computer) I simply removed the date from the hostname to come up with the username.
Basically, if my username is bobsmith and today’s date is 2019-12-06, I will name the host:
bobsmith191206
then in my Powershell script I just need to set$userName = $env:computername -replace '[0-9]'
then the hostname remainsbobsmith191206
and now I have a variable$userName
that now equalsBOBSMITH
Anyhow, that is one of those… so easy it is dumb solutions. Not sure why I didn’t think of it earlier. Thanks again you guys for helping me to think outside of the box I stuck myself in.