User Tools

Site Tools


scripts

Here are a few powershell scripts that i have written, feel free to take a look!

Printer Settings: I wrote this script for our onboardings it is used to disable letting microsoft manage a user's default printer and sets a PDF printer software as our default printer

Set-ItemProperty -Path “HKCU:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows” -Name “LegacyDefaultPrinterMode” -Value 1 $printerName = “PDF Writer - bioPDF” $printer = Get-CimInstance -Class Win32_Printer -Filter “Name='$printerName'” $printer | Invoke-CimMethod -MethodName SetDefaultPrinter

Desktop Icons: This script is to copy all of the desktop icons that our onboardings require, there is a shortcut in those icons that does not work unless i create a directory in the C drive matching the shortcut's file path.

Copy-Item -Path “\\Path\to\server\*” -Destination “$env:USERPROFILE\Desktop” -Recurse; mkdir “C:\ASI Documents”

Bitlocker Activation: Powershell script for enabling Bitlocker protection on the C drive of a machine and saving the recovery key into a .txt file and saving it onto one of our servers.

Enable-Bitlocker -Mountpoint “C:” -RecoveryPasswordProtector -SkipHardwareTest; (Get-BitLockerVolume -MountPoint C).KeyProtector.recoverypassword > “\\Path\to\server\Bit locker keys\$env:COMPUTERNAME”

Zoom Install: Here is a script for installing the Zoom Workplace Application.

md c:\source1; Invoke-WebRequest “https://www.zoom.us/client/latest/ZoomInstallerFull.msi” -UseBasicParsing -OutFile C:\source1\zoom.msi; msiexec /i C:\source1\zoom.msi /qn

scripts.txt · Last modified: 2025/04/23 16:30 by wizardadmin