Network Connections Config Issue in Windows 10 Tech Preview 10041 Build

UPDATE: Blog comments are awesome. Just to stop you from having to look any further, Darren Shetler explains in the comment section (and I’ve confirmed) that the way to fix this is to:

  1. Go into Device Manager
  2. Delete the network devices – do NOT uninstall their drivers when asked!!!
  3. Run “Scan For Hardware Changes” to add the network devices back to Windows

Afterwards, everything worked with an admin account, a regular account (prompts for admin credentials) and still worked after a reboot. If you want to be careful, do this to only one network interface, and confirm that it’s back working before you do the rest; that is, don’t get rid of your otherwise-functional WiFi and wired connections at the same time. Thanks for posting this, Darren!

Aleksandar Nikolic (co-founder and editor of powershellmagazine.com) asked the community if anyone else on the 10041 build of Windows 10 Technical Preview (pushed mid-March 2015) was getting “An unexpected error occurred” when we tried checking or changing the properties of a network connection. I checked with both a regular account (which should have prompted me to enter an admin account’s password) and my admin account, and got the same thing both times:

An unexpected error occurred. Very helpful.

An unexpected error occurred. Very helpful.

However unenlightening that was, it was still better than the absolute nothing that happens when I tried disabling/enabling network devices or clicking “Diagnose this connection” – was it registering that I was clicking at all?

Fabien Didot joined in the thread to let us know that PowerShell cmdlets Get-NetAdapter and Get-NetIpAddress work, and I can confirm that they do from both a regular and an admin account. However, Disable-NetAdapter and Enable-NetAdapter fail from both with an access denied error – expected behavior from a regular account, but certainly not from an admin account. Helps if you start PowerShell using “Run as Administrator” :) Totally works that way!

As far as other reports of this, I’ve turned up the Windows10 subreddit and a Guru3D thread.

If anyone else with the 10041 build could please try enabling or disabling a network interface with PowerShell, please let me know how you get on – is it just me, or are others experiencing this? Again, helps if you remember “Run as Administrator”!

Looks like it really is just the GUI.

Quickly turn SkypeUI on and off without opening Regedit – Skype for Business Preview

The Skype for Business Technical Preview has been pretty great so far, and if I had my choice, I’d use it 100% of the time (get it here). However, I occasionally need to take screenshots for our end users, most of whom have recently been upgraded to Lync 2013 from Office Communicator 2007 R2! Several people have posted the proper registry key to add and change in order to switch UIs (great example here), but frankly, opening Regedit always makes me a tiny bit nervous, even if I am running as a non-admin user. If you are not running as a non-admin user for regular email/Lync/internetting, please think very hard about why!

Here are some little PowerShell functions I’ve written to quickly make this change and restart the Lync/Skype for Business client (can also be downloaded from TechNet Gallery)


# QuickSkypeUISwitch.ps1, Version 1.01
# Amanda Debler, http://mandie.net
# now with no-so-new Provider hotness - thanks, Kevin Bird (http://kb-kb.com), for reminding me that providers exist :)


# See if the key exists, and if so, what its current value is
 
function Test-SkypeUIRegKey {
    # old cmd-style registry query
    # reg query "HKCU\Software\Microsoft\Office\Lync" /v EnableSkypeUI
    try {
        get-ItemProperty HKCU:\Software\Microsoft\Office\Lync -Name EnableSkypeUI
        }
    catch [System.Exception] {
    "Registry Key does not exist or cannot be accessed - if Skype for Business UI isn't coming up, try Enable-SkypeUI"
    }
}
 
# Lazy assumption that you have Lync set to autostart, plus
# trickery to find, kill and restart your Lync/Skype4B client,
# because I have no idea where you installed it
 
function Restart-SkypeForBusiness {
    $lyncProcess = Get-Process -Name Lync
    $lyncProcess |  Stop-Process
    Start-Process -FilePath $lyncProcess.Path
}
 
# The /f means force - don't care if you have a key there already or not
 
function Enable-SkypeUI {
    # old but not busted cmd-style registry key insert
    # reg add "HKCU\Software\Microsoft\Office\Lync" /v EnableSkypeUI /t REG_BINARY /d 00000001 /f

    # Note the commas in the Value - Binary registry keys are treated as 4 bytes
    New-ItemProperty HKCU:\Software\Microsoft\Office\Lync -Name EnableSkypeUI -Value 00,00,00,01 -PropertyType Binary -Force
    Restart-SkypeForBusiness
}
 
function Disable-SkypeUI {
    # reg add "HKCU\Software\Microsoft\Office\Lync" /v EnableSkypeUI /t REG_BINARY /d 00000000 /f
    New-ItemProperty HKCU:\Software\Microsoft\Office\Lync -Name EnableSkypeUI -Value 00,00,00,00 -PropertyType Binary -Force
    Restart-SkypeForBusiness
}

Get-CsTopologyFixed Loves Your Simple URLs!

Yes, I know there is no such thing as a tbxml tag. That doesn't mean that there shouldn't be.Remember how I was complaining last week about how Get-CsTopology -AsXml drops the whole SimpleUrlConfiguration node, which makes Topology Builder sad?

Fixed it!

You, too, can enjoy what I do in the evenings on my ridiculous lab machine and get your own readable (though read-only) .tbxml files right from PowerShell:

Get-CsTopologyFixed (hosted on TechNet Gallery)

It works for View-Only Administrators (CsViewOnlyAdministrator), as well as full CsAdministrator (or equivalent), so your telephone gal or Exchange guy can grab a copy whenever they need to check something or a consultant wants a copy so that they understand what’s going on with Lync in your environment. I have not tested it with an account that only has, for example, CsUserAdministrator or CsServerAdministrator.

For people who are not (yet) hard-core PowerShellers: this script is a function, not a standalone script. Running it “dot-sourced” will add the Get-CsTopologyFixed cmdlet to your current PowerShell session, or you can add the function to your Lync Server connection script. You need to either be on a computer with Lync Management Shell (part of the Lync management tools on the Lync Server installer image) or implicitly remoted to one that has it in order to access the native Lync Server cmdlets.

Here is the function to take the output of Get-CsSimpleUrlConfiguration and put it into an XML node, which my full script then drops into the rest of the Topology XML:

    function Convert-CsSimpleUrlConfigurationToXMLText { 
        $GetCsSimpleUrlConfiguration = Get-CsSimpleUrlConfiguration 
        $SimpleUrlConfigurationOut = "" 
        $simpleUrlConfigurationOut += '<SimpleUrlConfiguration xmlns="urn:schema:Microsoft.Rtc.Management.Settings.SimpleUrl.2008" UseBackendDatabase="false">' 
     
        foreach ($simpleUrl in $GetCsSimpleUrlConfiguration.SimpleUrl) { 
            $SimpleUrlConfigurationOut += "<SimpleUrl Component=`"$($simpleUrl.Component)`" Domain=`"$($simpleUrl.Domain)`" ActiveUrl=`"$($simpleUrl.ActiveUrl)`">" 
            foreach ($simpleUrlEntry in $simpleUrl.SimpleUrlEntry) { 
                $SimpleUrlConfigurationOut += "<SimpleUrlEntry Url=`"$($simpleUrlEntry.Url)`" />" 
            } 
            $SimpleUrlConfigurationOut += "</SimpleUrl>" 
        } 
 
        $SimpleUrlConfigurationOut += '</SimpleUrlConfiguration>' 
 
        $SimpleUrlConfigurationOut 
    }

I have no idea if it works (or is even necessary) on Lync Server 2010. If Microsoft will let me have a preview copy, I’d be willing to find out if it works (or is even necessary) on Skype for Business ;)

If you find something wrong with my script, or come up with an improvement, let me know!

PowerShell Heart Logo

PowerShell logo in a heart

I love PowerShell, and so should you!

The #PowerShellChicks group was initiated by the foremost lady of PowerShell, June Blender:

I think we need a logo! A PowerShell symbol hatching from an egg would have been awesome, but my graphic design skills are pretty much limited to PowerPoint. To celebrate having my session on Lync admin basics selected for the 2015 PowerShell Summit Europe, here’s a little something I knocked together. If someone wants to do the curved gradient and motion lines that are on the real logo (and perhaps improve the overall proportions), knock yourself out and let me know about it!

 

 

Get-CsTopology Hates Your Simple URL Configuration

Yes, I know there is no such thing as a tbxml tag. That doesn't mean that there shouldn't be.

Yes, I know there is no such thing as a tbxml tag. That doesn’t mean that there shouldn’t be.

UPDATE – get the fix from the TechNet Gallery and read about it here!

Several of my Unified Communications team colleagues need to be able to get current copies of the topology on demand to hand to consultants or to just have some idea of what’s going on in our Lync world, but don’t have any business editing it and would rather not install the Lync Management Tools on their PCs. My team lead and I both thought that having a little script keep an up to date copy on our team’s SharePoint site was just the thing, and I pointed out that Get-CsTopology -AsXml should work quite nicely. *Should* being the important word in that sentence.

Get-CsTopology, like many things, is about 95% awesome. The 5% of not awesome is that it does not pull the Simple URLs. It fills in its best (and wrong) guess for the Phone access URLs, but shows that the Meeting URLs and the Administrative Access URL are missing, the first of which is a fatal flaw in a Lync topology.

Continue reading

mandie.net – New Domain Name, Same Geeky Posts

Slug Bug GREEN!

Sometimes, a move can be difficult. This one wasn’t.

Since I’ve changed over to my company’s Communication Systems team, and am now focusing on Lync instead of ActiveRoles Server, this blog was due for a new identity – “Ars de ARS” at “insideactiveroles.com” is a strange place to go when you’re looking for Lync information. Regular readers may have noticed the change from “Ars de ARS” to “Mandie’s Memos”; now I’ve gone in for a new domain name. I got “mandie.net” back when I was in college and hadn’t been using it for much other than a vanity email address, so now it points to my blog, where it is being used for vanity publishing.

ActiveRoles Server is still an important part of my company’s user and groups management, and our Lync automation ties into to, so I will continue to write about it occasionally. If you want to read something that still is mostly about ActiveRoles Server, check out a fellow Dell/Quest ARS forum regular’s blog: http://clan8blog.wordpress.com. An “Active Directory engineer at a large hedge fund in the city (London)”, he mostly writes about automating AD administration with PowerShell and ActiveRoles Server. Lately, his posts have been getting deeper into PowerShell.

As for Mandie’s Memos, Lync is the current focus, with a heaping side of PowerShell. I will keep all the old stuff about Exchange, Active Directory and ActiveRoles Server around, because people hit those pages via Google all the time – it must be helping someone, and that’s what this is all about (that and me writing things down for when I’ll later forget them). I’ll also keep the old domain name for awhile, at least until it looks like Google and Bing have figured out that I’ve moved.

Windows Fabric Gone Wild!

Amanda Debler:

Does anyone know WHY Windows Fabric would generate logs like mad? Our Lync Front End servers have about 10 of these per DAY right now. I’ve not turned off the logging or changed it to circular as I want to have the logs on hand to send Microsoft if needed – instead, I’m moving them over to an empty volume with this script running as a scheduled task each night.

if (-not (Test-Path "E:\Windows Fabric Traces")) {
	New-Item -ItemType Directory -Name "E:\Windows Fabric Traces"
}
$fabrictraces = Get-ChildItem "c:\ProgramData\Windows Fabric\Fabric\log\Traces" | where { $_.name -like "fabric_traces_*"} | sort -Descending LastWriteTime
#skip the first two - one of them is the trace file in use, the other is the most recently full one
for ($i=2; $i -lt $($fabrictraces.count); $i++) { $fabrictraces[$i] | Move-Item -Destination "E:\Windows Fabric Traces\" }

$leasetraces = Get-ChildItem "c:\ProgramData\Windows Fabric\Fabric\log\Traces" | where { $_.name -like "lease_traces_*"} | sort -Descending LastWriteTime
for ($i=2; $i -lt $($leasetraces.count); $i++) { $leasetraces[$i] | Move-Item -Destination "E:\Windows Fabric Traces\" }

However, this is only treating the symptoms, not the cause, so the search continues…

Originally posted on Thoughts From a Bot Named Flinch:

CrashHow’s that for the title of a blog article! Apparently I’ve been reading too much Huffington Post or something. For the record, I never read that website. I have standards, as low as they may be.

So back to the title and the point of this post. Are there actually hidden log files that could cause some unintended problems with your Lync 2013 environment? Absolutely. I am assuming you are already aware that IIS logs could fill up your local hard drive. It is also a good idea to keep an eye on the trace files created by OCS Logger and Snooper.

However, there are some hidden logfiles that are created by Windows Fabric that could very much fill up your hard drive and it would be a decent challenge to find them. If you are unaware, Lync 2013 sits on top of a technology called Windows Fabric. For a…

View original 381 more words