Skip to content

Instantly share code, notes, and snippets.

Set-ExecutionPolicy RemoteSigned
# Prompt for the account name
$username = Read-Host "Account name"
# Get the current expiry date
$accexp = Get-LocalUser -Name $username | select AccountExpires
# Display the account name with the expiry date in a easy to read format
Write-Host "Account " -NoNewline; Write-Host $username -BackgroundColor White -ForegroundColor Black -NoNewline; Write-Host " is " -NoNewline; Write-Host $accexp.AccountExpires -BackgroundColor White -ForegroundColor Black
# Get a new expiry
$newexp = Read-Host "Enter new expiry"
# Set the new expiry
<script>
//
// This code is taking the url http://example.com/index.asp?person=john
// We're after the value from the parameter 'person' and setting it to an inputbox on the page
//
function getParameterByName(name, url) {
// If the URL variable is null
if (!url) {