Skip to content

Instantly share code, notes, and snippets.

Avatar

Kevin Cefalu kevinCefalu

View GitHub Profile
@kevinCefalu
kevinCefalu / Get-ADUserLastLogon.ps1
Created Aug 26, 2021
Get the last recorded login timestamp for users across multiple domain controllers
View Get-ADUserLastLogon.ps1
#Requires -Module ActiveDirectory
using namespace Microsoft.ActiveDirectory.Management;
function Get-ADUserLastLogon
{
<#
.SYNOPSIS
Get the last recorded login for one or more users across one or more domain controllers
@kevinCefalu
kevinCefalu / Get-ThingiverseFile.ps1
Last active Apr 7, 2020
Function to download a thingiverse file archive
View Get-ThingiverseFile.ps1
function Get-ThingiverseFile
{
[CmdletBinding()]
[OutputType([void])]
param (
[Parameter(Mandatory)]
[uint32] $Id,
View Update-WallpaperFromWindowsSpotlight.ps1
<#
.SYNOPSIS
Update your desktop wallpaper from Windows Spotlight using PowerShell
.NOTES
Author: Shannon Graybrook
Github: github.com/realslacker
#>
#requires -version 5.1
View Update-WallpaperFromWindowsSpotlight.ps1
<#
.SYNOPSIS
Update your desktop wallpaper from Windows Spotlight using PowerShell
.NOTES
Author: Shannon Graybrook
Github: github.com/realslacker
#>
#requires -version 5.1
@kevinCefalu
kevinCefalu / Invoke-PercentCalculation.ps1
Last active Jan 24, 2020
A function to invoke percentage calculations.
View Invoke-PercentCalculation.ps1
function Invoke-PercentCalculation
{
<#
.SYNOPSIS
Invoke a Percentage Calculation
.DESCRIPTION
Invoke a Percentage Calculation for one of the
three following calculation types:
@kevinCefalu
kevinCefalu / Get-MultiFileHash.ps1
Last active Jan 24, 2020
A function to calculate hashes on files, using one or more algorithm types.
View Get-MultiFileHash.ps1
function Get-MultiFileHash
{
[CmdletBinding(DefaultParameterSetName = 'Path')]
param (
[Parameter(
Mandatory,
ParameterSetName = 'Path'
)]
[string[]] $Path,