Thursday, January 10, 2013

Validating Windows Credentials Remotely

I occasionally work with customers that require using alternate credentials to access resources on remote machines.  These machines are sometimes part of a domain or just workgroup systems.  I wanted to throw something together to provide a few examples of testing credentials on a remote computer.

Note: Some of these commands may not work due to firewalls/restrictions in place on the remote machine.  Be sure to verify the appropriate services are enabled and permissions are set.

SMB Access

Use this command to map a remote share as a network drive; You will be prompted for credentials
 net use x: \\192.168.1.118\c$  


Use this command to remove your mapped network drive
 net use x: /delete

Use this command to map the network drive, but include credentials in a single command
 net use x: \\192.168.1.118\c$ password /user:username


WMI Access

Use this command to verify you have access to WMI on the remote machine
 wmic /node:"192.168.1.118" /user:user /password:password bios



Remote Registry

I did not know of a way via command line to test registry access, so I chose to use the example of connecting to a remote registry via regedit.exe

Launch regedit.exe

Click File > Connect Network Registry


Enter in the hostname or IP Address of the remote machine and click OK


You will be prompted for a username and password


Once authenticated, you will now see the remote machine as a separate node in your registry editor.  Navigate around to verify you can view registry keys.


Verify account is in admin group

Aside from launching a Computer Management console (compmgmt.msc) and connecting to the remote machine, here is another WMIC command that will enumerate the users and groups.  I added a piped find to look for any line with "Administrators" to single out the Administrators group.

 wmic /node:"192.168.1.118" /user:username /password:password path win32_groupuser | find /i "Administrators"



Tuesday, September 11, 2012

Clear Print Spooler on Windows

I was continuously receiving calls that some customer-facing printers were not printing receipts.  At first, the quick/easy solution was to reboot the server (desktop), but doing so would then clear the "jammed" print job and start dumping out hundreds of queued up print jobs.

I hate printing in general, but I wasn't running the business so I had to come up with a solution that wouldn't waste baby trees.  I stumbled across this post on Microsoft, How to cancel printing or to delete a print job that is stuck in the print queue in Windows XP.  It provided some commands to clear the print queue files.  I already knew that stopping/starting the service resolved the issue, but I wanted to get rid of the hundreds of queued up jobs.

Here is the code that Microsoft provided.  Per the title of the article, this was geared toward Windows XP.  The machine that we were working with was Windows 7.  Creating a batch file and running when the print queue jams got us in business!  Never found out why the proprietary software/printer combination was jamming up at least once a week (even with reboots every other night).

 net stop spooler  
 del %systemroot%\system32\spool\printers\*.shd  
 del %systemroot%\system32\spool\printers\*.spl  
 net start spooler  

Monday, September 10, 2012

Remembering Vince Offer

Vince Offer entered our lives with the Sham Wow.  I'm sure you remember it, it was practically the same thing Billy Mays was selling, Zorbeez.  I've never personally used either of these products, but I would have purchased the Zorbeez simply because it was endorsed by Billy Mays.

Later, Vince was selling the Slap Chop, direct competitor with Billy Mays' Quick Chop.  The commercial for the Slap Chop was pretty good.  DJ Steve Porter remixed it and this is what he came up with (EPIC).


With all of the fame, Vince couldn't stay away from temptation.  He was busted for assaulting a prostitute.


After some time out of the limelight, Vince decided it was time to embrace his mistake and endorse yet another competing product, the Schticky.  Now the product does seem rather amazing, even though I already own the Sticky Buddy, but the commercial is even better.

Thursday, June 28, 2012

Outlook/Exchange Sync Issues - Problems in cached exchange mode

I was helping troubleshoot a users in ability to send/receive messages within Outlook. We are running Microsoft Exchange 2010 and are using cached exchange mode within Outlook(somewhat troublesome but apparently necessary with extremely large deployments of exchange). The user deleted their entire mailbox except for about 15MB worth of mail, though they were still seeing in OWA (Outlook Web Access) that their mailbox was over the limit by about 500MB. Reviewing the folder properties in Outlook showed a discrepancy between the local cached copy and the server copy of about 500MB in the Outbox folder. Nothing that we were doing was proving successful. We tried creating a new local profile within Outlook, tried performing various tasks in OWA, nothing was working. We could not get the Outbox folder to update. Our next thought was to try and see what was in his Outbox on the server. OWA only shows the core mail folders (Inbox, Sent Items, Deleted Items, etc.) but we needed to see the Outbox. I did not want to toy around with Powershell so I turned to google... The solution ended up being to sign into OWA in using the light version, which allows you to see all folders within your mailbox (makes no sense, right?). We were able to view the Outbox folder and purge the offending mail clearing up the issue. The next step is to determine how his Outbox ended up so full of old messages that it accumulated enough to fill up his mailbox. We are currently monitoring the users cached and server copies to see if a discrepancy occurs. If I find out what caused this, I will surely post.

Thursday, May 10, 2012

WDTV Live Streaming issue from share with poor Internet connection

I have had my WDTV Live and FreeNAS server setup and working together for awhile now.  Recently, my Internet has been very intermittent due to my underground being damaged.  Because of this, I noticed that when attempting to connect to my FreeNAS share on my WDTV Live box, it would hang while connecting and eventually error out saying it could not find a connection!  Lies!

At first I didn't realize this was causing it.  Eventually I figured it out when the WDTV couldn't connect to my server, my Internet was non-functional as well.  Since we have cellular service with a data plan, the Internet has not been too huge of an inconvenience.  Now that it was affecting TV time... that's a problem.

I was able to get it to work by logging into the Tomato web interface of my router and "Release" my IP which effectively disabled my WAN port and defunct Internet connection.  The problem with this work around was when my signal was sufficient for Internet access, I would have to log back into the router and "Renew" my IP. When the signal worsened, Internet access would be unheard of and my WDTV would not connect to my server.

After battling it out for a few weeks, I eventually had a revelation.  I simply restricted all Internet access from my FreeNAS server at my router.  This Access Restriction allowed me to specify all day every day, the IP Address of my FreeNAS server was not able to access the Internet.  Upon saving this configuration, my WDTV was able to connect to my server without any hanging or issues.

Only downside I see to this method is now I cannot access any Internet media through the WDTVs slow/poorly designed interface.  I rarely used it, but now it's no longer a possibility.  Oh well.

One day I plan on building a little media PC to connect to my TV and allow me to access files on my server.  Hopefully the interface will be better thought out and less crappy.

Tuesday, May 8, 2012

Play MKV files on Xbox 360

I've been working on a number of projects that I want to post about, but one that's been a little frustrating was getting certain MKV files to play on an Xbox 360 using the Windows 7 Media Extender.

I was helping a friend setup his network so he could stream movies from his computer to his 360 and we found that only certain movies would play.  MKV files would not play.  Research showed that this was due to the type of audio the files were using.  Even though the video would play on the computer in Media Player (with the appropriate codecs installed), it would not play on the 360.  The 360 would not play DTS (Direct Theater Systems) audio tracks but would play AC3.

Searching various keywords returned a lot of results stating DTS won't play on 360 and a bunch of tutorials on how to convert the video files to a supported format.  Unfortunately none of these results were helpful.  Maybe it was dumb luck or initial my poor choice of keywords but we finally came to a post on carbonize.co.uk that was also a walkthrough on converting your files.  The steps were fewer and only required one application.  We gave it a shot on some files and it worked great.

Here are the steps from carbonize explaining what to do in XMedia Recode (get the Portable version).  The only thing we did differently was step 5.  We did not select Copy, but convert with the defaults.  Worked like a champ!  Thanks carbonize!!


  1. Drag the video file you want to convert over on to the XMedia Recode window and wait for it to finish checking it
  2. Click on the video in the list near the top of the XMedia Recode window
  3. Click the Format tab and change Profile to Custom, Format to MP4 and File Extension to mp4
  4. Click the Video tab and tick the Video Copy box at the bottom of the options
  5. Click the Audio tab and under Modus select Copy. If your file has multiple audio streams you can choose to remove some at this point.
  6. At the bottom, under Output, change it to Source Path so the mp4 version appears in same folder as the original (optional)
  7. Click Add Job at the top
  8. Click Encode

Wednesday, October 12, 2011

Force Windows Media Player to remain maximized after closing in Windows 7 (Work around)

If you were used to WMP retaining your preference to stay maximized in Windows XP, and were disappointed when WMP in Windows 7 did not keep this setting, but rather auto adjusted the window size to the resolution of the video, here is something that may help.

The only reason I prefer WMP over VLC or any other player is because of the way it displays/docks the playlist.  I like the playlist to be part of the video window, so it cannot block any of the video or disappear behind windows.  Additionally I liked that WMP would always remain maximized even after I had closed it.  To get around this stupid change that Microsoft has made, I found some VBS code that can assist.

Simply save this code in a file with the extension "vbs" (ie. wmpmax.vbs) and place it in your startup folder.  This will launch every time you log into Windows and will set the appropriate registry key to the value to have WMP maximized.  This will run every 2 seconds (2000 milliseconds).  You can change that value to whatever you want.  Just remember, it's in milliseconds so however long you want it to wait in seconds, times that by 1000.

 Set WshShell = WScript.CreateObject("WScript.Shell")  
 Do Until x = 1  
 WshShell.RegWrite "HKCU\Software\Microsoft\MediaPlayer\Preferences\Maximized", 1 ,"REG_SZ"  
 Wscript.Sleep 2000  
 Loop