I found when posting batch files in WordPress I sometimes got unwanted smiley faces. So a batch subroutine called output shows up like this: :output To avoid this use the code : to escape the colon. The result is displayed: :output
Month: November 2009
Logged on User, part 2
In my post at https://www.akaplan.com/?p=248, I said there are many ways to get the logged on user. That code is limited to console users. I wanted a method that would show me both interactive users and RDP users. I found some nice code by MVP Torgeir Bakken at http://www.ureader.com/message/1436360.asp, and made some changes to add error handling,…
A Low Privilege Internet Explorer Shortcut
Your users should never have administrative rights on their workstations. But many Admins are administrators of their local system, and are obviously running with elevated permissions when they log onto servers. You should never cruise the internet on a server. But you may need to go to Windows Update, or to vendor sites for drivers. The…
Find User’s Last Logon
A user’s last logon authentication is recorded on the server where the logon (or unlock) occurred. FindLastLogon.vbs queries all the Domain Controllers in your domain for this information. You can send the results to your clipboard. No elevated rights required. Updated on 9/8/10 to improve error handling and queries of other domains. Tags: logon
The Internet is Broken
When I first saw this, I told my ISOs that the “internet is broken.” This is just the first of what I expect to be a torrent of problems: “A Turkish grad student has devised a serious, real-world attack on Twitter that targeted a recently discovered vulnerability in the secure sockets layer protocol. The exploit by Anil…
Ghosts in the Machine (getting rid of unused drivers)
There is a good article on howtogeek.com about how to “Remove Old Drivers After Upgrading to New Hardware”. The tip works for Vista and XP. Recommended. http://www.howtogeek.com/howto/windows-vista/remove-old-drivers-after-upgrading-to-new-hardware/
View Files on Remote USB drive
The USB Monitor can be configured to silently notify you when a USB drive is inserted in a user’s computer. If you suspect wrongdoing, you can use USBDriveFiles.vbs to connect to the remote system, map a drive to the device and browse the files on the USB drive. Some interesting coding problems, if you want to take a look at the…
Is it a terminal server?
If you are running logon scripts you may want to bail, or do something special if the server the user is logging onto is a terminal server. isTermServer.vbs will allow you to test/determine whether a local or remote server is a terminal server, and returns an errorlevel for batch handling. Run without arguments for syntax. …
When was a GPO last applied to a system?
When troubleshooting group policy objects, you want to know whether they are applying. Inspired by an article by Chris Stauffer at myITForum.com, I decided to write GPOLastApplied.vbs to get this data on the fly. You can query a system locally or remotely to see when a GPO was last applied. Tags: GPO
The Machine SID Duplication Myth
Mark Russinovich, the founder of SysInternals, and now a Microsoft employee has debunked what we all learned about duplicate SIDS. http://blogs.technet.com/markrussinovich/archive/2009/11/03/3291024.aspx Note that the advise does not apply to systems that have been joined to a domain and then cloned. Still a really bad idea. Also, SysPrep is still recommended. A worthwhile read. Tags: SIDS