Posted by essjae on February 11, 2016
Here’s a quick way to get rid of the “public” network on Windows and switch it to a more usable private network type.
- Open a PowerShell Window.
- Get the list of network profiles on the system. Note the InterfaceIndex number listed, you’ll need it for the final step.
- Change the network interface to private, use the network interface index number from the previous command.
Set-NetConnectionProfile -InterfaceIndex xx -NetworkCategory Private
Posted in Networking, Windows 2012 | Tagged: Networking, powershell, Windows, Windows Server 2012 | Leave a Comment »
Posted by essjae on February 10, 2016
I hit a small issue while working on building up a test SCCM/SCVMM lab in Hyper-V.
My primary system (call it One) has Windows 10 and is domain joined, but I’ve been doing the “Microsoft” thing and logging in with my “Microsoft” account instead of my local domain account.
I’ve got two Hyper-V hosts, one on Windows Server 2012 R2 and another running on Windows 10* (call it Two). I’ve been able to launch my Hyper-V Manager on One and connect and manage the Hyper-V VMs on Server 2012.
However, I hit a roadblock trying to connect to Two. The first thing I tried after failing and getting some error messages was to configure winrm.
I opened an administrator PowerShell window and ran
and followed the wizard and was able to start the winrm service and open the firewall.
Again in a administrator PowerShell window, I ran:
Enable-WSManCredSSP -role client -delegatecomputer two.mydomain.com
Failure! I got a big text message in red that said to run winrm quickconfig.
This is odd, since I did none of this to connect to the Server 2012 Hyper-V instance.
I then shift+right-clicked on Hyper-V Manager and ran it with my domain credentials and it ran! Ah ha! No problem, just create a runas shortcut for Hyper-V Manager.
C:\Windows\System32\runas.exe /user:mydomain\myusername /savecreds "%windir%\System32\mmc.exe "%windir%\System32\virtmgmt.msc""
Again, no joy. Launching my new short-cut from a command prompt showed the error:
740: The requested operation requires elevation.
The command needs ADUC elevation, with some Googling** I finally found a solution, first launch a cmd prompt and then the command. This allows you to receive the ADUC prompt and accept it.
C:\WINDOWS\system32\runas.exe /savecred /user:mydomain\myusername "cmd /c Start /B %windir%\System32\mmc.exe "%windir%\System32\virtmgmt.msc""
The path to the Hyper-V Manager icon is here:
*I don’t recall my logic in installing Windows 10 here instead of Server 2012…it may have just been laziness, an upgrade to Win10 from the previous Windows 8.1 OS that was installed.
Posted in Hyper-V, Uncategorized, Virtualization, Windows 10, Windows 2012 | Tagged: Hyper-V, Microsoft, powershell, RunAs, Virtualization, Windows 10, Windows 2012 r2, winrm | 1 Comment »
Posted by essjae on June 7, 2011
Green should replace blue for all Windows error screens from now on. Instead of enraging the hapless Windows user, it will sooth them, and they won’t mind a failed nVidia (or other) driver stopping their system. I got this idea after reading this article: http://mcpmag.com/articles/2011/06/06/color-my-powershell-world.aspx on changing your PowerShell error messages to green from red…since red has such negative connotations that it shouldn’t be used. This reminds me of this article: http://www.dailymail.co.uk/news/article-1101790/Teachers-banned-using-confrontational-red-ink-case-upsets-children.html where marking incorrect answers with red demoralizes “the children”
Posted in Uncategorized | Tagged: powershell, Windows | Leave a Comment »