Alan's Blog

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

Menu
  • About My Blog
Menu

Tag: PowerShell

Finding Rarely Used Computers On Your Network

Posted on February 13, 2016March 15, 2020 by Alan

I support a number of hospitals.  Many of these have very large facilities, where the placement of computers was originally done by a space planner or others trying to make an educated guess about how and where people would be working.  Frequently we find that there are computers which are unused or only rarely used. …

Read more

Get Oldest Windows Event

Posted on February 13, 2016 by Alan

Get-OldestEvent.ps1 is a PowerShell advanced function which returns the oldest event from a Windows computer event log, and will help you determine the rollover time for an event log by also returning the age of the record as a time span with the time created. Optionally you can return the entire oldest record with the…

Read more

Passwords for Password Resets

Posted on September 7, 2015September 7, 2015 by Alan

I discovered that my script to generate passwords, RandomPW.vbs, isn’t popular with users because the passwords are random.  I have an even more complicated but unposted PowerShell version with the same issue. I wanted to create something that was easier for the help desk and users.  Get-TempPW.ps1 is my answer to those objections.  This script…

Read more

Get the Parent OU for an AD Object

Posted on September 7, 2015September 23, 2017 by Alan

I have mentioned before that the Charlotte PowerShell User group was frequented by Scripting Guy Ed Wilson, and his wife Teresa. I’m sad to say that they have moved away, but am happy that Brian Wilhite has been running the meetings since.  I mentioned to Brian that I had a cool way to get the…

Read more

Test Whether Organizational Unit or Account Exists

Posted on September 7, 2015 by Alan

Here are two quick functions which I have recently found useful. The first tests whether a user account exists. It takes the Domain and Identity as arguments. Using the “Stop” error action with Try/Catch keeps it from showing any errors. You can do this with any of the AD cmdlets, such as Get-ADOrganizationalUnit, Get-ADComputer and…

Read more

Skype and PowerShell – Toggle Mute, Export Participants

Posted on April 19, 2015September 15, 2018 by Alan

Updated September 2018. Note that this code works with Lync 2010 and Skype for Business, and that some of the scripts have been updated. I spend a lot of time in Skype (formerly Lync) conferences. There are two things about the Lync 2010 client which drove me nuts.  The first is that there was no…

Read more

Export PowerShell script output to Text with Out-Notepad

Posted on March 8, 2015March 8, 2015 by Alan

Out-Notepad.ps1 lets you redirect the output of a PowerShell command or script into Notepad. There are a couple of interesting things here. In Line 23, I use [System.IO.Path] to get a random file name. In line 34 I use [Microsoft.VisualBasic.Interaction] to shell out to Notepad and wait for it to close before deleting the file….

Read more

Export DNS Server Records with PowerShell

Posted on March 8, 2015March 8, 2015 by Alan

I am frequently asked to export DNS records, such as, “Give me the list of A, MX and CName records in DNSZone1 and DNSZZone2”. Server 2012 has got some nice cmdlets, but I wanted something more universal with a GUI. Export-DNSEntries.ps1 uses a combination of Out-GridView and a custom from to allow you to pick…

Read more

Auditing Active Directory Permissions with Powershell

Posted on November 22, 2014February 25, 2024 by Alan

Active Directory permissions aren’t easy to audit.  It is a lot easier to delegate permissions to a user or a group than it is to figure out later who has what rights on what containers and organizational units.  I have taken a few runs at it, including a vbscript version which was terrible.  That is…

Read more

A GUI Select of Properties for PowerShell Scripts

Posted on November 22, 2014May 14, 2016 by Alan

Updated Version, with pipeline support is here. I have been writing a number of reporting and audit scripts where there are a lot of potential properties that the user might want in the log file or report.  It is hard to guess what items that they want in their report or in what order that…

Read more
  • Previous
  • 1
  • …
  • 4
  • 5
  • 6
  • 7
  • 8
  • 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

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

Terms and Conditions - Privacy Policy