Posts

Showing posts from August, 2024

PowerShell Script/Cmdlet: Get-UserAccountControlPolicy

Image
A PowerShell function that returns detailed information regarding how User Account Control is configured on the current system in a human-readable format. Installation Instructions: Determine where your local scripts directory is with the following command: ([IO.DirectoryInfo](Join-Path $Profile.CurrentUserCurrentHost ".." "Scripts")).FullName Create a new file within that directory and name it Get-UserAccountControlPolicy.ps1 . Copy and paste the contents below into that file and save it. function Get-UserAccountControlPolicy { [CmdletBinding( ConfirmImpact = 'Low', DefaultParameterSetName = 'HideStatusParameterSet', PositionalBinding = $false, SupportsPaging = $false, SupportsShouldProcess = $false )] [OutputType([Object[]])] [Alias('Get-UACPolicy')] param ( [Parameter(ParameterSetName = 'HideStatusParameterSet')] [Alias('AccountScope',...

PowerShell Script/Cmdlet: Get-NthRoot

Image
A PowerShell function that computes the principal nth root n^A of positive real number A. Installation Instructions: Determine where your local scripts directory is with the following command: ([IO.DirectoryInfo](Join-Path $Profile.CurrentUserCurrentHost ".." "Scripts")).FullName Create a new file within that directory and name it Get-NthRoot.ps1 . Copy and paste the contents below into that file and save it. function Get-NthRoot { $Phi 1.6180339887498948482045868384 Creates the variable $Phi within the Global scope for convenient access to the golden ratio whenever and wherever desired. .EXAMPLE $semitone = Get-NthRoot -Radicand 2 -Degree 12 -Precision 5 PS > $noteFreq = @{ 'C' = 16.35160; 'C#' = 17.32391; 'D' = 18.35405 >> 'D#' = 19.44544; 'E' = 20.60172; 'F' = 21.82676 >> 'F#' = 23.12465; 'G' = 24....