This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2026, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| function Get-RawSmbiosData { | |
| [OutputType([byte[]])] | |
| [CmdletBinding()] | |
| param () | |
| Add-Type -TypeDefinition @' | |
| using System; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S uv run --script | |
| # Copyright: (c) 2026, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| # /// script | |
| # dependencies = [ | |
| # "gssapi", | |
| # "krb5", | |
| # "cryptography", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2025, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| # Added GetLastErrorRecord | |
| #Requires -Module @{ ModuleName = 'Ctypes'; ModuleVersion = '0.3.0' } | |
| using namespace System.ComponentModel | |
| using namespace System.Management.Automation | |
| using namespace System.Runtime.InteropServices | |
| using namespace System.Security.Principal |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2025, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| using namespace Microsoft.CodeAnalysis | |
| using namespace Microsoft.CodeAnalysis.CSharp | |
| using namespace Microsoft.CodeAnalysis.Emit | |
| using namespace Microsoft.CodeAnalysis.Text | |
| using namespace Microsoft.PowerShell.Commands | |
| using namespace System.Collections.Generic | |
| using namespace System.IO |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2025, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| using namespace System.Net | |
| using namespace System.Net.Security | |
| Function Disable-CertificateTrust { | |
| [CmdletBinding()] | |
| param () |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2025, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| using namespace System.IO | |
| using namespace System.Management.Automation | |
| using namespace System.Net | |
| using namespace System.Security.Cryptography | |
| Function Import-PemEncodedRsaKey { | |
| <# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2025, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| using namespace System.DirectoryServices | |
| using namespace System.Formats.Asn1 | |
| using namespace System.Management.Automation | |
| using namespace System.Numerics | |
| using namespace System.Security.Cryptography.X509Certificates | |
| Function Get-CertificateTemplateInformation { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2025, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| Function Get-LapsADUpdateTime { | |
| <# | |
| .SYNOPSIS | |
| Gets the Windows LAPS Update Time. | |
| .DESCRIPTION | |
| Gets the Windows LAPS Update Time for the specified computer account. The output value is a DateTime object representing the update time as a UTC date time. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright: (c) 2025, Jordan Borean (@jborean93) <jborean93@gmail.com> | |
| # MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
| Function New-CommonTaskTriggerProp { | |
| [OutputType([hashtable])] | |
| [CmdletBinding()] | |
| param ( | |
| [Parameter()] | |
| [switch] | |
| $Disable, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $k32 = New-CtypesLib Kernel32.dll | |
| $free = $total = $totalFree = [int64]0 | |
| $res = $k32.SetLastError().GetDiskFreeSpaceExW( | |
| $k32.MarshalAs('C:\', 'LPWStr'), | |
| [ref]$free, | |
| [ref]$total, | |
| [ref]$totalFree) | |
| if (-not $res) { | |
| throw [System.ComponentModel.Win32Exception]::new($k32.LastError) |
NewerOlder