Why does adding URL to IE Compatibility View fix PowerShell 'Cannot find an overload for getElementByName' error? - powershell

I had a similar issue compared to the following SO threads:
Powershell System.__ComObject.document property no longer works under IE 9
PowerShell IE9 ComObject has all null properties after navigating to webpage
Cannot find an overload for "getElementById" and the argument count: "1"
My error was something to the effect of:
Cannot find an overload for "getElementsByName" and the argument count: "1"...
So I looked at each of these threads to help determine the why and the solutions to this problem.
I'm running PowerShell 4.0 on Windows Server 2012 R2. The script runs with Execution Policy Bypass and I am also running PowerShell as an Administrator (i..e. Administrator: Windows PowerShell ISE) AND my user account is part of the Administrator group. The URL the script is accessing is on the Intranet (one would think Internet Explorer isolates it to the proper zone, namely the Intranet Zone).
The script worked fine on my local machine but not on this server.
Here are the list of things I tried--one at at time, never in combination--that failed to yield a successful outcome:
Disabled Protected Mode in the Internet Zone.
Added URL to Trusted Zone Sites. Note that Protected Mode was already disabled. Only change I made here was adding the URL to the Trusted Sites list.
Disabled IE Enhanced Security Configuration completely. Administrators was already set to Off, but Users was set to On. I set Users to Off, which had no effect.
Ensured PowerShell ISE was running in Administrator mode (elevated privileges). It didn't seem to matter what mode PowerShell ISE was running in, likely because Execution Policy is set to Bypass.
Added URL to Intranet Zone Site List. Note that Protected Mode was set to disabled, prior to. Only change I made in this zone was adding the URL to its Site List. Initially worked but then I tried again and same problem. May have been a fluke that it worked.
Here are the list of things that I tried--again, one at a time--that solved the problem:
Added URL to Compatibility View with Display intranet sites in Compatibility View unchecked.
Added URL to Compatibility View with Display intranet sites in Compatibility View checked.
So the question is why does employing Compatibility View resolve the problem? What's different about this that the other things I tried didn't work?
One would think Trusted Zone Site List should do the trick. Security Level for Trusted Zone is set to Medium. For Intranet Zone, it's Medium-low. And for Internet Zone, it's set to Custom.
Is it related to one or more of the individual properties that you can set in a Security Level? Is it something under the covers with Registry, COM, IE?
Good thing is I found 2 solutions which worked. Bad thing is I don't quite understand why. Obviously, it works because of some relaxed security permissions. Maybe it's also tied to Group Policy settings. I'm not sure.
Anyone have any ideas here? Thank you.

Related

Problems with MS TFS 2018's Dashboards, Build Pipelines, and Icons

I am having some recent problems with TFS 2018 that have escaped my ability to troubleshoot. The application runs on a Hyper-V VM hosting Server 2019 and connects to a separate MS SQL 2016 database over on a separate Windows 2019 VM.
A few weeks ago we migrated our database server over to a new machine which, over the course of setting our existing TFS server up to use the new database, required us to run though the TFS setup wizard again.
Everything was fine for about a week when we started to have issues, specifically with the TFS web front-end we use. First we lost various icons on the webpage, with the browsers (Chrome, Firefox, etc). replacing them with rectangles:
A little while after that we lost our project Dashboards, and the whole dashboard page is just blank now. A little while after that, our WIP build/test automation feature also lost its management section of the site.
Other than these things not displaying, things generally "work" - the source control stuff functions, work items can be interacted with, etc. It's just that the interface is clumsier without the icons (which extends to every icon within every work item type, not just the banner I shared) and we can't get our automated test reports without the site's front-end for it. The latter is the real show stopper.
I spent some time troubleshooting and at best was able to figure out a maybe solution for the icon problem: https://social.msdn.microsoft.com/Forums/en-US/c1038468-9d94-473d-a020-254789e9a19b/tfs-2015-update-2-missing-icons?forum=tfsgeneral
This seemed to do the trick for just the icon problem, though some time later they disappeared and reappeared when people were refreshing pages. I'm still unsure if the re-failure was a fluke or not, as we rolled back the VM snapshot the changes were made on shortly after.
Using Chrome's developer tools, it seems like the lack of dashboard data is related to issues retrieving content on the host server for a cause we cannot determine.
Here is what shows up on the DevTool in Chrome for our main project's Dashboard:
What's interesting is the error claims widget.css is either not present or empty. Neither of these are the case as I can find the file and read data in it.
I recognize MIME types as a thing that shows up in IIS but I don't know what to do with the information. Should I be adding .css to the MIME Types list within IIS? Maybe that was set and the wizard reverted it?
Here's what shows up in the Builds section:
Thing is, I don't know what to do with this information. I found some vague hints online from people having similar issues with sites they were themselves coding (which stated the errors in question were red herrings), but this TFS front end is not something I've created and I had not any idea what to do with the information shared.
Does anyone have an idea of what might have gone wrong with the dashboards here? I have run out of ideas and can't figure out a different attack angle to approach this from.

Setting up the default browser (IE, Homepage)

Those are actually two different questions but still they are connected. I am trying to make a script to automate the installation of company PCs for new employees.
An old script used to work fine but as of the 1703 update (or some time prior. No-one really knows), the changes no longer do their job and I cannot seem to find a fix.
The task:
Change the default browser from Edge to Internet Explorer
Set the IE homepage to "https://www.google.com"
Concerning the first problem: I have tried changing the Registry entries at
HKCU:\Software\Microsoft\Shell\Associations\UrlAssociations\http(s)\UserChoice\ No luck there. I have also tried exporting and the setting using DISM but importing them back has proven to be beyond my capabilities (Basically, I ran into this problem: https://social.technet.microsoft.com/Forums/en-US/d5fad871-8f5e-4c74-abaf-627809f8844b/ I cannot programatically change the settings for an existing user)
When facing the second problem, I tried searching the registry for the default site "go.microsoft.com/fwlink/p?LinkId=..." and changing the values. At one startup (After I modiffied the registry key
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main value "Start Page"), IE displayed a prompt to the user informing them that an external appliation wishes to change the homepage but no change actually occured. And this only happened once (even after I changed the value again to a different site)
A preferred method would be using Powershell but after googling and ripping my hair out for two days straight, I am open to any suggestions. If it makes any difference, it's a 64-bit Windows 10 Pro

MS Access 2007 error number: 2950 on Trusted Document?

In my *.mdb file I have a macro with an action that runs TransferText and gives me an Error Number of 2950 which according to Microsoft means that the document is not trusted, as far as I know it is trusted! It's located in the Trust Center Trusted Locations.
Is there an explanation point next to the Action causing this in the macro whose tooltip reads This action will not be allowed if the database is not Trusted.
I already tried running a compact and repair on it, what could be causing this?
Method 1: Enable the database for the current session
When you use this method, Access 2007 enables the database until you close the database. To enable the database for the current session, follow these steps:
On the Message Bar, click Options.
In the Microsoft Office Security Options dialog box, click Enable this content, and then click OK.
Note You must repeat these steps every time that you open the database.
Check here: https://support.microsoft.com/en-us/kb/931407
The problem can be as simple as not having first established an ODBC connection. I was getting this macro error (2950), and I ended up reading all the support threads, getting nowhere.
Then it struck me to install our ERP client first --which is the front-end for the database I was trying to access ...with Access.
Doing this established an ODBC configuration, so now when I opened my Access file, an ODBC prompt opened up before I even got to any of the functions that were triggering the error. In hindsight, I could have passed on installing the ERP client, and just went to the ODBC settings in Windows, and pointed a connection to the SQL table.
In my case there was a naming conflict. The macro in turn called a VBA function, and I had inadvertently named the function with the same name as the module it was in. They were both named "RobertsReport". Once I changed the name, everything worked as expected.
Tip: As troubleshooting steps, try running the macro solo by double-clicking on it. If you can, copy only the line that generates the error to a new macro to test it by itself, and of course include any preceding commands it may need to run properly. Once I did this it greatly narrowed down the problem until the lightbulb came on over my head.

Fiddler not displaying sessions

I've got the latest version of fiddler installed on 2 machines (v2.3.0), and on one machine it displays web sessions, and in the other it doesn't.
This is using IE and Firefox on Win7.
I have tried deleting my customrules.js and letting fiddler create a new one.
I know that the broken machine is indeed proxying traffic through fiddler, as I see the fiddler SSL cert when I go to HTTPS sites.
I have set the option at the bottom-left of the window to All Processes, Web Browser and Non-Browser to no avail. I just can't seem to get the sessions to display.
Any hints to where I should look to find out what's going wrong?
Thanks,
Kirk
In rough order of likelihood..
Ensure File->Capture Traffic is checked (obviously).
Ensure it says "All Processes" in the bottom left.
Flick to the "Filters" tab and uncheck Use Filters (I always forget this..)
Same goes for the "AutoResponder" tab.
Click the "Process Filter" button on the toolbar once to make sure it's off.
Go to Help->About Fiddler and compare the port number with IE->Options->Connections->Lan settings->Proxy server->Advanced
If that fails, uncheck the following:
Rules->Hide Image Requests
Rules->Hide HTTPS Connects
Rules->Hide 304s
To eliminate anything in the rules script, go to Rules->Customize Rules and add the following line to the end of OnBeforeResponse():
oSession.oFlags.Remove("ui-hide");
(If that fixes it, something in your rules is setting oSession["ui-hide"])
After these steps its time to think 'applicatin specific'. For example .net won't proxy for "localhost". This page has application specific tips, such as PHP, .net, Java, Win 7 phone,etc..
If all that fails, go to the Fiddler group and post a question, you'll normally get a pretty quick response from Eric Lawrence himself.
simple..
http://www.fiddler2.com/fiddler/help/faq.asp
Set the Status bar filter to "All Processes", check that the Process Filter in the toolbar isn't set, and examine the Filters tab to make sure that no rules are enabled. If you've written or set any Rules (see the menu) check those too.
I ran into this problem as well and as mentioned before it can happen because of the proxy server.
For me the problem was I was using a VPN Proxy Extension, such as Hola or Unblock Youku. So I simply turned them off.
Simply try out this
Help -> Troubleshoot Filters
And also click the 'Filters' tab and either uncheck Use Filters or modify the filter appropriately.
If the other answers don't work, right click on fiddler and select "Run as Administrator".
I just had the same issue and resolved it by ending all Fiddler processes in Task Manager by checking the Show processes from all users. Another user on the machine I use(loaner) still had a Fiddler session going. Ending that session and beginning a new one seems to have fixed the problem for me.
this worked for me but uncheck Troubleshoot not showing any sessions to me
i have no filter no rule
any process checked
all sessions checked

Strange behavior by the BDE Administrator

Logged into my Windows XP SP2 computer using my normal user account (which has Local Admin privileges), when I start the BDE Administrator -- either from the Control Panel or from the BDEADMIN.EXE directly -- I never get the GUI. It shows up on my task bar, and shows up in the Task Manager, but the GUI never appears. I can close the program by right-clicking on the task bar and choosing close. (note that "never" means not within 5 minutes of launching the program)
If I log into the same exact computer using a different user account (which also has Local Admin privileges), when I start the BDE Administrator, it loads the GUI within a couple seconds.
I used to be able to use the BDE Administrator while logged in under my normal user account, so it's not like this has always been a problem.
While this issue may not be directly programming related, it does make developing and testing a pain when I have to log off and back on a couple of times just to make changes to my BDE configuration.
I am totally stumped. Any idea what might be causing this odd behavior?
One idea is that you may have had two screens running on this box and dragged the window off screen.
Just search for the registry keys that control where the window opens up and delete them. Alternatively, you should be able to right click on the program in the task bar and select Move. Then use your arrow keys to bring it back.
Regardless, I'm voting to close.