So it looks like the exit code snippit is partial. We see the last part of an if and no beginning sub declaration. I wonder if the author, Ben Norcutt, could revise this to include the full code snippit.
I think this is a brilliant solution many have been looking for, but unfortunately the answer provided is partial!!
Thanks for the response. I deal with people that have lingering old OSes so I try to figure these out. Unfortunately, they have less memory on those things so it was easier remoting in and changing it manually. Just going to focus on Windows 10. Still curious why so hard to get an alias.
Thanks for the code. Unfortunately, I tried it on some older OSes. Windows 7. I had great difficulty trying to find alias on that machine. Since it had an older powershell there was not a get-netadapter command. I finally found the alias using the wmic NIC command. It turned out to be Local Area Connection. However, the command did not work saying it could not find that alias. I spent a few hours trying to figure out why but to no avail. It was the only windows 7 device on the network but I was stubborn. Any suggestions? I just changed it manually but still curious.
Hi David I was looking for this for longtime. But I have one more questions. I am very new in this scripting world but learning… I am trying to create a script that will install printer package onto remote machine. when I will run the script it will open the dialog box to select the printer package. I got it so far to select now how can I parse that to copy the selected file to the remote machine. I know the copy part but wondering how to use this dialog box part to select in the copy portion. I would appreciate your answer if you can. Thanks a lot in advance.
This is not working. I copy cmd.exe over osk.exe, sethc.exe, UtilMan.exe. Then I restart the computer and get to the Login screen — and MS Defender has restored the files already. Rebooting again into Safe Mode is pointless: it is too late. (And yes, I did try it!) Maybe MS has moved the Defender check earlier in the boot process, but you need to disable MS Defender BEFORE performing the cmd.exe copy and rebooting. Is that possible? Unless there is a way of booting into Safe Mode /without/ visiting the login screen first…
Is there really still no way to automate the login process? I know with Connect-MicrosoftTeams I can very easily pass credentials too it and automate a script. This module would be perfect if I could automate the login process.
While happily looking at what I’ve been learning, there’s this realization (and warning) that I’m forching the codes to just ‘stop’ at the 1st record/occurence of ‘Ethernet 2’. What if there’s more? What if the value ‘Ethernet 2’ appears on the 2nd, 3rd, so on…? How will I be able to capture it if it’s not on the 1st record? Meaning, how will I be able to capture ‘Ethernet 2’ in InterfaceAlias when/if I don’t know when it will appear?
You’ve introduced me to string formatting in your latest reply. Thank you!
How amazing that this 2018 article is still relevant. As we increasingly understand, IPv6 was “a 1990’s solution to a 1980’s problem” (Geoff Huston, July 2020), which is exactly what Mario describes above.
RE: IPv6 “prevented the gradual evolution of IPv4” Yeah, you hit the nail on the head! Eight years after reading this insightful article, I and my small research team at Peking University have managed to propose something to effectively extend the life span of IPv4, shamelessly termed “A Long Term Evolution Approach” of IPv4.
P.S. ‘ the “Internet Engineering Task Force” had no clue at all…’ Good point. Here’s another quote from Geoff Huston !(https://www.potaroo.net/ispcol/2022-04/hopbyhop.html): “Many years ago, the IETF tried to distinguish itself from other technology standards bodies… It seems to me that the ensuing years have eroded these IETF aspirations. It appears that the IETF has decided that volume is far easier to achieve than quality. These days, what the IETF is generating as RFCs is pretty much what the IETF accused the OSI folk of producing back then: Nothing more than voluminous paperware about vapourware!”