We have a lot of servers. When I get disconnected, I may leave hanging sessions on those servers which I forget to properly close. Then, after I change the password for my admin account, I sometimes get locked out as a result of what I had open in the now disconnected session. Tracking this down…
Check SCCM TempDB space
Sometimes a poorly framed query or collection can cause SCCM collections to be left forever in an evaluation state. As a result, the TempDB for the SCCM server can grow to the point where it fills the available drive space. When that happens, SQL stops, and SCCM stops. Some advice: TempDB is recreated when the…
1E Wakeup Script
Saving energy by putting systems to sleep or by turning them off can have a big return in a large enterprise. 1E’s Nightwatchman and Wakeup allow you to power on the systems with SCCM and other products. But what if you are running a batch file or a script? Or what if you want to RDP to a computer…
Get a list of domain user logons for a list of computers
Where has Bob logged on? You can scan the security logs to get this information. SCCM sometimes is available to give you a list. But the list of people who have logged on is also available from the computer itself. PCDomainLogonHistory.vbs creates a list of users who have logged onto a computer. It takes a list…
Shutdown if logged off
Power management is a big deal because turning off computers can save you company a lot of money. However, turning off a locked computer could cause a data loss. Finding out who is always locked is also important. ShutdownIfLoggedOff.vbs will allow you to choose how to handles this. You can 1) Always logoff, even if a user is…
Warn user to move files on desktop
Users ought not keep files on their desktops. (It is okay for admins, as we understand the risks). If you are about to do an upgrade, or just want a reminder, then FilesOnDesktop_Agent.vbs is for you. This will pop up a window with a list of files and a dire warning about data loss. If you have…
Problem reading DateLastModified of file in root of C: by non-admin User on Win7
Create a file, c:\test.txt using administrative rights on Windows 7. Add any data and saveChange modification stamp by editing it and saving Run this vbscript:set fso = CreateObject(“Scripting.FileSystemObject”)logfile = “c:\test.txt”Set f = fso.GetFile(Logfile)dModifiedTime = f.DateLastModifiedwscript.echo dModifiedTime I found that the above works for admin user, but returns file creation time or an error for non…
Threat of destructive coding on foreign-manufactured technology is real
The federal government has identified technology components in the U.S. supply chain that have been embedded with security flaws, the top U.S. civilian cybersecurity official said Thursday. http://www.nextgov.com/nextgov/ng_20110707_5612.php What we have speculated about for years — malware code embedded in components — has been verified in testimony to Congress by DHS. You don’t have to…
Rename a script or batch file to text for email
I email my scripts frequently. To get through email filters I change them to a text file. This script will convert a file from file.ext to file_ext.txt. You can use the file name as an argument or drop and drag. The routines came from http://www.robvanderwoude.com (updated 7/18) @ECHO OFF SetLocal rem handle multiple drop and drag…
Should you change your password
Well, yes. But if you are wondering whether a password has been compromised, you may like https://shouldichangemypassword.com/. This site has a compiled database of compromised accounts. Put in your email address and it will check it against the list.