This file contains 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
<# | |
.SYNOPSIS | |
Script to install Dev Tools on Windows Server (tested on 2022) | |
.DESCRIPTION | |
Installs the following from multiple resources: | |
Microsoft.VCLibs v14.00 (github) | |
Microsoft.UI v2.8.6 (github) | |
winget-cli (dynamic version retrieval from api.github.com) | |
Microsoft.WindowsTerminal (dynamic version retrieval from api.github.com) | |
Microsoft pwsh.exe vCurrent (winget) |
This file contains 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
function Wait-TranscriptEnd { | |
<## | |
.SYNOPSIS | |
Waits for the creation and completion of a PowerShell transcript file (helpful in race conditions). | |
.DESCRIPTION | |
This function polls for the existence of a transcript file and then monitors its content until a specific end pattern is detected. | |
.PARAMETER transcriptPath | |
The path to the transcript file. Required. | |
.PARAMETER pollSeconds | |
The polling interval in seconds. Default is 10 seconds. |
This file contains 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
function Wait-UntilAdComputerDeleted { | |
<# | |
.SYNOPSIS | |
Waits until a specified computer object is deleted from all domain controllers. | |
.DESCRIPTION | |
This function checks the deletion status of a specified computer object across all discovered domain controllers. It waits until the object is confirmed deleted on all domain controllers or identifies any inaccessible controllers after a specified number of failures. | |
.PARAMETER computerName | |
The name of the computer object to check for deletion. Required. | |
.PARAMETER sleepInterval | |
The number of seconds to wait between checks. Default is 5 seconds. |
This file contains 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
<# | |
.SYNOPSIS | |
PowerShell script using ChatGPT API for interview preparation. | |
.DESCRIPTION | |
Collects user inputs (job title, industry, resume, company name, interviewer details) | |
and generates interview topics, skills, questions, answers, and more using the ChatGPT API. | |
.INPUTS | |
Job Title | |
Industry | |
Resume |
This file contains 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
function Test-CPUFeature { | |
param ( | |
[Parameter(Mandatory=$true)] | |
[ValidateSet("SSE4.2", "SSE4A")] | |
[string]$Feature | |
) | |
$signature = @" | |
[DllImport("kernel32.dll")] | |
public static extern IntPtr GetCurrentProcess(); |