Sunday, July 2, 2017

Repetier host "Exception during socket read:Too many items in the combo box" - Solved!

I purchased a new BoXZY (3D printer, laser and CNC Mill) and have been pretty pleased so far.
See https://boxzy.com/

One little issue though is that I have been trying to configure it so that I can 3D print from my laptop without having to connect a USB cable to the printer.
The layout in my office is not convenient for the cable to span across the room.  Also, when I start using it for CNC Milling, I do not want to necessarily have my laptop too close to the router making all the dust. 

My first attempts to install Repetier Server on various platforms was less than successful.
I found that I often would get the error message "Exception during socket read:Too many items in the combo box" when I connected the application to whatever server that I configured.

What confused me is that it would work perfectly on one of several computers,. but I could not find a root cause.

In addition, I received a Smart Controller (Beta) from BoXZY which came with Windows 10 Home as well as the BoXZY interface. 

For me this would be a perfect remote server for Repetier since I could execute print jobs directly from the device, or I could submit them from my laptop,

Unfortunately, my first few attempts to get this to work were also not successful.
In desperation, I also installed a Raspberry Pi with Repetier server and had the same issue. 

After reading a couple of forums that described these same symptoms, and some rather confusing instructions on how to reproduce the problem, I think that I have figured out a work-around to this issue.

Basically, the issue is with the client, and having more than one printer defined. 
In fact, this thread http://forum.repetier.com/discussion/3360/too-many-items-in-the-combo-box-exception-in-reperier-host where the responder, an official with the Repetier group, says "I think I have solved for next release".

In any case, here is what I found.
Starting with a configuration that gives me the error as follows:
  • I install Repetier Server on the new computer.
  • I launch the Client, in my case the BoXZY interface
  • In the client, I select to configure a new printer.
    • Select Config -> Printer Settings
    • I Configure the connector to be Repetier-Server, and then fill in the IP address of the above server.
    • Click the Show button and a web page for the server will be launched,  Copy and paste the API Key from the server.
    • Now, in the Client, click on Disconnect and then Connect and you see the error message "Exception during socket read:Too many items in the combo box".
If the above happens to you, here are the steps that I found will fix that client.
  • Click Disconnect to detach the connect from the printer.
  • Click on Config -> Printer Settings
  • Click on the little Trash Can Icon next to the Printer name
  • Click Yes on the popup to confirm
  • Now enter a new name in the printer field.  The name should be what you want to use going forward. Then click OK.  
    This will pop up an error message: Unhandled Exception has occurred in your application.
  • Click Quit.  This will close the client application.
  • Now relaunch the client application. 
  • Select Config->Printer Settings one more time.
  • You will notice that it has your Printer name, but a default configuration.,
  • Change the Connector to Repetier Server, and enter the IP address of the server.
  • Click Show as above and again copy the API key from the web page.
  • Now it should be working properly.

Monday, March 6, 2017

Exchange DAG Failover Report - CollectOverMetrics.ps1

Below is my quick command that requires no customization to run on any installation:

  • Get-DatabaseAvailabilityGroup |%{ .\CollectOverMetrics.ps1 -DatabaseAvailabilityGroup "$($_.name)" -StartTime ((get-date).AddDays(-365)) -EndTime ((get-date)) -MergeCSVFiles}

Note that this script is located in the "Scripts" directory of your Exchange v15 installation. 

Friday, March 3, 2017

Raspberry PI - ADS-B

I have been working on a few Raspberry PI projects and seem to be a consistently drawn to an ADS-B project.
The context is that I was planning a Flight Data Recorder (GPS, Gyro, and G-meter) for recording an Aerobatic flight, and find that there are several initiatives that use very similar components to build an ADS-B device.

My thoughts are that the Data logging and the ADS-B projects could be combined to create a "black box" recorder that could used for 3 target markets:
  1. ADS-B out as per the original project.
  2. Data Logging for Aerobatic flight analysis as well as Schools and shared planes.
  3. "Black Box" information in the event of an accident or crash.  

The projects of interest are:



Monday, May 30, 2016

Use Splatting, Proxy, and Metadata in Powershell

Use Splatting, Proxy, and Metadata in Powershell

  • Splatting is the ability to use a dictionary or a list to supply parameters to a command.

    Example:
    $MailMessage = @{
        To = “me@mycompany.com
        From = “me@mycompany.com
        Subject = “Hi”
        Body = “Hello”
        Smtpserver = “smtphost”
        ErrorAction = “SilentlyContinue”
    }
    Send-MailMessage @MailMessage
  • Proxy commands are wrappers of existing commands in Windows PowerShell, and to make this possible, a number of different things had to be enabled in the language that can have interesting other uses.
  • Metadata provides information about the command and parameters of different commands, and provides a structure that you can use to “write” a command without typing out the whole script.

https://blogs.technet.microsoft.com/heyscriptingguy/2010/10/18/use-splatting-to-simplify-your-powershell-scripts/

Tuesday, April 19, 2016

Running Windows Explorer with different "RUNAS" credentials



As part of securing access to Active Directory, and following the Least Privileges Principle, it has been a goal of mine to be able to run all Administrative Tasks on a Management workstation while only logging in to the workstation using a generic, minimum Privileges user account.


While most management consoles can be launched in a "RUNAS" mode, it has been an Achilles Heel that it has always been thought that you could not run Windows Explorer in a RUNAS.   This prevents you from doing File System Permission management.


Well, my genius friend (who is an absolute wizard at Google Searches) has found an answer.


Follow the step below to do it. 
  1. Start the Registry Editor as an Administrative User.
  2. Navigate to, take ownership of, and grant yourself Full Control permission to the key HKEY_CLASSES_ROOT\AppID\{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}
    (This is "Elevated-Unelevated Explorer Factory")
  3. Rename the value RunAs to _RunAs.
  4. Close Regedit.
  5. runas /user:domain\username "c:\windows\explorer.exe /separate"
     
OR another description:

  1. Start -> Run -> regedit
  2. Navigate to the registry key: HKEY_CLASSES_ROOT\AppID{CDCBCFCA-3CDC-436f-A4E2-0E02075250C2}
  3. Right click on the registry key and click Permissions…
  4. Give Full Control permissions to the user logged in.
  5. Start -> Run -> dcomcnfg.exe -> Expand DCOM Config
  6. Right click and select properties of “Elevated-Unelevated Explorer Factory”, click the Identity tab and select “The launching user”

Friday, April 15, 2016

Active Directory Last Logon. Lots of confusion

I am sure that everyone who administrates AD runs into this problem at some point.

Here is an article that thoroughly lays it all out.

http://social.technet.microsoft.com/wiki/contents/articles/22461.understanding-the-ad-account-attributes-lastlogon-lastlogontimestamp-and-lastlogondate.aspx

The summary of this article is, that if you want to find out the TRUE last logon activity for a user, it is best to use the command

Search-ADAccount -AccountInactive -DateTime ((get-date).adddays(-90)) -UsersOnly

If you are ONLY interested in dates that are more than 14 days ago, then you can safely use the "LASTLOGONDATE" attribute.  

Less than 14 days of viewing and you cannot rust this attribute.  You must get fancy and query all of the DC's individually. 

Sunday, February 21, 2016

6 Tips for troublsheooting Active Directory (Link)

I found this article quite helpful.  It contains some excellent detailed information.

https://redmondmag.com/articles/2009/07/01/6-tips-for-troubleshooting-active-directory.aspx

Especially detailed is the AD Diagnostics Registry settings: