Alan's Blog

"Yeah. I wrote a script that will do that."

Menu
  • About My Blog
Menu

Author: Alan

See https://www.akaplan.com/about/

Find and Reset RDP Sessions

Posted on October 24, 2011August 11, 2019 by Alan

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…

Read more

Check SCCM TempDB space

Posted on October 13, 2011October 13, 2011 by Alan

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…

Read more

1E Wakeup Script

Posted on August 25, 2011February 28, 2019 by Alan

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…

Read more

Get a list of domain user logons for a list of computers

Posted on July 13, 2011July 13, 2011 by Alan

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…

Read more

Shutdown if logged off

Posted on July 12, 2011July 12, 2011 by Alan

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…

Read more

Warn user to move files on desktop

Posted on July 12, 2011July 12, 2011 by Alan

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…

Read more

Problem reading DateLastModified of file in root of C: by non-admin User on Win7

Posted on July 8, 2011July 8, 2011 by Alan

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…

Read more

Threat of destructive coding on foreign-manufactured technology is real

Posted on July 8, 2011February 28, 2019 by Alan

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…

Read more

Rename a script or batch file to text for email

Posted on June 30, 2011August 24, 2011 by Alan

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…

Read more

Should you change your password

Posted on June 27, 2011March 9, 2015 by Alan

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. 

Read more
  • Previous
  • 1
  • …
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • …
  • 42
  • Next

Search

Please Note

All the scripts are saved as .txt files. Newer files have a “View Script” button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use “Save Target As”. Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with version 3 or later.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient.  If you find a post error or a script which doesn’t work as expected, I appreciate being notified.  My email is my first name at the domain name, and you are welcome to contact me that way.

Tags

1E ACLS Active Directory ActiveDirectory ADSI Advanced Functions Audit Change Administrator Password COMObject Computer Groups DateTime Desktop DNS Excel FileScriptingObject Forms General GPO GPS Group Policy Hacks ISE Lockout logons NAV740 Nessus OU OU permissions Outlook Pick Folder Power PowerShell Powershell Scriptlets RDP SCCM schedule reboot Scripting Security Shell.Application user information VBA Windows Update WMI WordPress WPF

Categories

akaplan.com

  • Back to Home Page

Archives

Scripting Sites

  • A Big Pile of Small Things
  • Adam, the Automator
  • Art of the DBA
  • Ashley McGlone
  • Boe Prox
  • Carlo Mancini
  • DexterPOSH
  • Doug Finke
  • Jaap Brasser's Blog
  • JeffOps The Scripting Dutchman
  • Jonathan Medd's Blog
  • Keith Hill's Blog
  • LazyWinAdmin
  • Nana Lakshmanan
  • PowerShell Magazine
  • PowerShell Team Blog
  • PowerShell.org
  • PwrShell.net
  • Richard Siddaway's Blog
  • Ryan Yates' Blog
  • Skatterbrainz
  • The Lonely Administrator

SQL Site

  • Art of the DBA

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2025 Alan's Blog | Theme by SuperbThemes

Terms and Conditions - Privacy Policy