🎯 PowerShell Fundamentals
PowerShell is Microsoft's scripting and automation framework. It works with objects, making it easy to chain commands together.
Getting Help & Information
🔹
Get-Command
Lists all available commands.
🔹
Get-Command -Module $Module
Lists commands from a specific module.
🔹
Get-Help -Name $Command
Shows full help for a command.
🔹
Get-Help -Name $Command -Parameter $Parameter
Shows help for a specific parameter.
🔹
Get-Command | Get-Member
Shows all properties and methods of an object. Alias:
gm🔹
$PSVersionTable
Shows current PowerShell version info.
🔹
Get-ExecutionPolicy -List
Shows execution policies for each scope.
🔹
Set-ExecutionPolicy -ExecutionPolicy $Policy -Scope $Scope
Sets the execution policy.
Note: RemoteSigned requires downloaded scripts to be signed. Unrestricted allows all scripts. Reset after use or scope to a single session.
📦 Variables & Data Types
Variables use the
$ prefix. PowerShell handles type conversion automatically in most cases.
Variable Declaration & Assignment
🔹
$variableName = value
Creates and assigns a variable. No prior declaration needed.
🔹
[datatype] $variableName = value
Creates a strongly typed variable.
🔹
Get-Variable
Lists all variables in scope.
🔹
New-Variable -Name $Name -Value $Value -Option ReadOnly
Creates a variable with optional attributes like ReadOnly.
🔹
Remove-Variable -Name $Name
Deletes a variable. Use
-Force for ReadOnly.Data Types & Type Casting
| Type | Description | Example |
|---|---|---|
| [int] | 32-bit integer | $num = 42 |
| [string] | Text string | $name = "PowerShell" |
| [bool] | Boolean (True/False) | $flag = $true |
| [array] | Collection of items | $list = @(1,2,3) |
| [hashtable] | Key-value pairs | $map = @{key="value"} |
| [float]/[double] | Floating-point numbers | $pi = 3.14159 |
🔹
$variable -is [type] # Check if value is of a type
Checks if a variable matches a given type.
🔹
[int]$result = 5 / 3 # Forces integer result
Casts a value to a specific type.
String Interpolation
🔹
"Hello $name" # Variable interpolation with double quotes
Double quotes expand variables. Single quotes treat everything as literal.
🔹
"{0} is {1}" -f $firstName, $lastName
Formats a string using indexed placeholders.
⚙️ Operators & Comparisons
Arithmetic Operators
| Operator | Description | Example |
|---|---|---|
| + | Addition | $a + $b |
| - | Subtraction | $a - $b |
| * | Multiplication | $a * $b |
| / | Division (returns float) | $a / $b |
| % | Modulo (remainder) | 7 % 3 # Returns 1 |
Comparison Operators
| Operator | Description | Example |
|---|---|---|
| -eq | Equals | $a -eq $b |
| -ne | Not equals | $a -ne $b |
| -lt | Less than | $a -lt 10 |
| -le | Less than or equal | $a -le 10 |
| -gt | Greater than | $a -gt 5 |
| -ge | Greater than or equal | $a -ge 5 |
Logical & String Operators
| Operator | Description | Example |
|---|---|---|
| -and | Logical AND | $true -and $false # $false |
| -or | Logical OR | $false -or $true # $true |
| -not / ! | Logical NOT | -not $true # $false |
| -like | Wildcard pattern match | "test" -like "t*" # $true |
| -match | Regular expression match | "test" -match "^t" # $true |
| -in | Check if in array | 1 -in @(1,2,3) # $true |
| -contains | Array contains value | @(1,2,3) -contains 2 # $true |
Assignment Operators
🔹
$a = 5 # Basic assignment
$a += 1 # Add and assign (increment)
$a -= 1 # Subtract and assign (decrement)
$a *= 2 # Multiply and assign
$a /= 2 # Divide and assign
Assignment operators allow shorthand for modifying variable values.
Ternary Operator (PowerShell 7+)
🔹
$result = $condition ? "yes" : "no"
The ternary operator provides a shorthand for if-else statements. Returns first value if true, second if false.
🔀 Control Flow & Logic
If-ElseIf-Else Statements
🔹
if ($condition) {
# Do something
} elseif ($otherCondition) {
# Do something else
} else {
# Default action
}
Runs code conditionally. Use -eq, -lt, -gt etc. for comparisons.
Switch Statements
🔹
switch ($value) {
'option1' { "First choice"; break }
'option2' { "Second choice"; break }
default { "Default case" }
}
Matches a value against cases. Use
break to stop fall-through.🔹
switch -regex ($array) {
'^[0-9]' { "Starts with number" }
'[a-z]' { "Contains lowercase" }
}
Matches array elements using regex patterns.
For Loops
🔹
for ($i = 0; $i -lt 10; $i++) {
Write-Output $i
}
Index-based loop with full control over start, end, and step.
ForEach Loops
🔹
foreach ($item in $collection) {
Write-Output $item
}
Loops over each item in a collection.
🔹
$collection | ForEach-Object { Write-Output $_ }
Pipeline equivalent of foreach. Use
$_ for the current item.While Loops
🔹
while ($condition) {
# Do something
$count++
}
Loops while a condition is true. May not run if condition starts false.
🔹
do {
# Do something (at least once)
} while ($condition)
Like while, but always runs at least once.
Flow Control Keywords
🔹
break # Exit the current loop or switch
continue # Skip to next iteration of loop
return # Exit function and return value
Controls loop and function execution flow.
Parameter Attributes
| Attribute | Description | Example |
|---|---|---|
| Mandatory=$true | Parameter is required | [Parameter(Mandatory=$true)] |
| ValueFromPipeline=$true | Accept input from pipeline | [Parameter(ValueFromPipeline=$true)] |
| ValidateSet | Restrict to specific values | [ValidateSet('option1','option2')] |
| ValidateRange | Restrict numeric range | [ValidateRange(1,100)] |
| Alias | Alternative parameter name | [Alias('ComputerName')] |
📦 Modules & Imports
Module Management
🔹
Get-Module -ListAvailable
Lists all installed modules on the system.
🔹
Get-Module
Shows modules loaded in the current session.
🔹
Import-Module -Name $Module
Loads a module into the current session.
🔹
Remove-Module -Name $Module
Unloads a module from the session.
🔹
Get-Command -Module $Module
Shows all commands in a module.
PowerShell Gallery (Package Management)
🔹
Find-Module -Name $Module
Searches PowerShell Gallery by name.
🔹
Find-Module -Tag $Tag
Searches PowerShell Gallery by tag.
🔹
Install-Module -Name $Module -Scope CurrentUser -Force
Installs a module.
CurrentUser scope doesn't need admin.🔹
Install-Module -Name $Module -RequiredVersion $Version
Installs a specific module version.
📁 File System Operations
Basic File Operations
🔹
Get-ChildItem -Path $Path
Lists files and folders at the given path. Alias:
ls, dir🔹
Get-ChildItem -Path $Path -Recurse
Recursively lists all files and subfolders.
🔹
New-Item -Path $Path -ItemType Directory
Creates a new folder.
🔹
New-Item -Path $Path -ItemType File
Creates a new empty file.
🔹
Remove-Item -Path $Path
Deletes a file or folder. Use
-Force for read-only items.🔹
Remove-Item -Path $Path -Recurse
Deletes a folder and all its contents.
File Content Operations
🔹
Get-Content -Path $Path
Reads a file's contents.
🔹
Set-Content -Path $Path -Value $Content
Overwrites a file with new content.
🔹
Add-Content -Path $Path -Value $Line
Appends to a file without overwriting.
🔹
Copy-Item -Path $Source -Destination $Dest -Recurse
Copies a file or folder. Use
-Recurse for folders.🔹
Move-Item -Path $Source -Destination $Dest
Moves or renames a file or folder.
📧 Exchange & Mailbox Management
Manage Exchange Online mailboxes and permissions. Requires the ExchangeOnlineManagement module.
Connection & Authentication
🔹
Import-Module ExchangeOnlineManagement
Loads the Exchange Online module.
🔹
Connect-ExchangeOnline -UserPrincipalName $UPN
Connects to Exchange Online.
🔹
$UserCredential = Get-Credential
Connect-ExchangeOnline -UserPrincipalName $UserCredential.UserName -ShowProgress $true
Connects using stored credentials with progress output.
🔹
Disconnect-ExchangeOnline -Confirm:$false
Disconnects from Exchange Online.
Mailbox Information
🔹
Get-Mailbox -Identity $Identity | Select-Object DisplayName, RecipientType
Gets mailbox details for a user.
🔹
Get-MailboxStatistics -Identity $Identity | Select-Object DisplayName, TotalItemSize
Returns the total mailbox size.
🔹
Get-MailboxStatistics -Identity $Identity | Select-Object DisplayName, ArchiveStatus, ArchiveSize
Returns archive size and status.
Mailbox Permissions & Delegation
🔹
Add-MailboxPermission -Identity $Identity -User $Delegate -AccessRights FullAccess -InheritanceType All
Grants another user full access to a mailbox.
🔹
Get-MailboxPermission -Identity $Identity
Shows who has access to a mailbox.
🔹
Remove-MailboxPermission -Identity $Identity -User $Delegate -AccessRights FullAccess -Confirm:$false
Revokes a user's mailbox access.
Calendar & MailTip Configuration
🔹
Set-MailboxCalendarConfiguration -Identity $Identity -PublishEnabled $true -AddOrganizerToSubject $false
Updates calendar sharing settings.
🔹
Set-Mailbox -Identity $MailboxEmailAddress -MailTip $MailtipMessage
Sets a MailTip shown to senders.
Archive Management
🔹
Set-Mailbox [email protected] -ArchiveQuota unlimited -ArchiveWarningQuota unlimited
Sets the archive quota to unlimited.
🔹
Enable-Mailbox -Identity $Identity -Archive
Enables a user's archive mailbox.
☁️ OneDrive Management
Commands for managing and troubleshooting the OneDrive client on Windows.
OneDrive Service & Process Management
Note: The OneDrive executable path changes depending on the Windows version and install type. If the path below fails, find the correct one via Task Manager → Details tab, right-click
OneDrive.exe → Open file location.
🔹
Start-Process "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe" /reset
Resets OneDrive using the most common per-user install path. Works on most Windows 10/11 machines.
🔹
Start-Process "C:\Program Files (x86)\Microsoft OneDrive\onedrive.exe" /reset
Resets OneDrive (x86 install path — common on older or 32-bit installs).
🔹
taskkill /f /im OneDrive.exe
Force-kills OneDrive. Run before uninstalling.
OneDrive Configuration
🔹
Set-ItemProperty -Path "HKCU:\Software\Microsoft\OneDrive" -Name "UserUpn" -Value $UPN
Sets the OneDrive UPN in the registry.
OneDrive Troubleshooting
🔹
Get-ChildItem -Path $Path -Recurse | Where-Object { $_.FullName.Length -gt 260 }
Finds files with paths over 260 characters.
🔹
Start-Process "C:\Program Files (x86)\Microsoft OneDrive\onedrive.exe"
Starts the OneDrive application.
OneDrive Uninstallation
🔹
%systemroot%\SysWOW64\OneDriveSetup.exe /uninstall
Uninstalls OneDrive. Terminate OneDrive.exe first.
🌐 Networking & Connectivity
Cmdlets for IP configuration, adapter management, and connectivity testing.
IP Address Configuration
🔹
Get-NetIPAddress
Lists all IP addresses on the machine.
🔹
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.1.100 -PrefixLength 24
Assigns a new IP address.
🔹
Set-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.1.10 -PrefixLength 24
Updates an existing IP address.
🔹
Set-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 192.168.1.10 -DefaultGateway 192.168.1.1
Sets IP address and default gateway.
Network Adapter Management
🔹
Get-NetAdapter
Lists all network adapters and their status.
🔹
Get-NetAdapter -Name "Ethernet" | Set-NetAdapter -Enabled $true
Enables or disables a network adapter.
Connectivity Testing
🔹
Test-NetConnection -ComputerName $Host
Pings a host and tests DNS resolution.
🔹
Test-NetConnection -ComputerName $Host -Port $Port
Tests connectivity to a host on a specific port.
🔹
Test-NetConnection -ComputerName $Host -Port 443 -InformationLevel Detailed
Returns detailed diagnostics including routing and latency.
Wireless Diagnostics
🔹
wlanreport
Generates an HTML wireless diagnostic report.
Traceroute
🔹
Test-NetConnection -ComputerName $Host -TraceRoute
Traces each hop to a destination. PowerShell equivalent of
tracert.🔹
tracert $Host
Classic CMD traceroute — also runs inside PowerShell.
DNS Resolution
🔹
Resolve-DnsName -Name $Hostname
Resolves a DNS name to IP. PowerShell equivalent of
nslookup.🔹
Resolve-DnsName -Name $Hostname -Server $DnsServer
Queries a specific DNS server — useful for testing split DNS.
🔹
Clear-DnsClientCache
Flushes the local DNS cache. Equivalent of
ipconfig /flushdns.🔹
Get-DnsClientCache
Shows all currently cached DNS entries on the machine.
Firewall
🔹
Get-NetFirewallRule | Where-Object { $_.Enabled -eq 'True' }
Lists all enabled firewall rules.
🔹
New-NetFirewallRule -DisplayName $RuleName -Direction Inbound -Protocol TCP -LocalPort $Port -Action Allow
Creates an inbound firewall allow rule for a TCP port.
🔹
Remove-NetFirewallRule -DisplayName $RuleName
Removes a firewall rule by display name.
⚡ Windows Power & Settings
Commands for managing power plans, sleep, hibernate, and related Windows settings.
View & Switch Power Plans
🔹
powercfg /list
Lists all power plans and their GUIDs.
🔹
powercfg /getactivescheme
Shows the active power plan.
🔹
powercfg /setactive $SchemeGUID
Activates a power plan by GUID.
| Plan | GUID |
|---|---|
| Balanced | 381b4222-f694-41f0-9685-ff5bb260df2e |
| High Performance | 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c |
| Power Saver | a1841308-3541-4fab-bc81-f71556f20b4a |
🔹
powercfg -restoredefaultschemes
Restores default Windows power plans.
🔹
powercfg /export $PlanPath $SchemeGUID
powercfg /import $PlanPath
Exports a power plan to file; import on another machine.
Sleep, Hibernate & Timeout Settings
🔹
powercfg /hibernate off
Disables hibernate and removes hiberfil.sys.
🔹
powercfg /hibernate on
Re-enables hibernate. Required for Fast Startup.
🔹
powercfg /change standby-timeout-ac $minutes
powercfg /change standby-timeout-dc $minutes
Sets sleep timeout for both AC (plugged in) and battery.
🔹
powercfg /change monitor-timeout-ac $minutes
powercfg /change monitor-timeout-dc $minutes
Sets screen-off timeout for both AC and battery.
🔹
powercfg /change disk-timeout-ac $minutes
powercfg /change disk-timeout-dc $minutes
Sets disk spin-down timeout for both AC and battery.
🔹
powercfg /change hibernate-timeout-ac $minutes
powercfg /change hibernate-timeout-dc $minutes
Sets the delay before sleep transitions to hibernate.
Fast Startup & Shutdown
🔹
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f
Disables Fast Startup. Ensures a full power cycle on shutdown.
🔹
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 1 /f
Re-enables Fast Startup. Requires hibernate to be on.
🔹
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled
Checks Fast Startup state:
0x0 = off, 0x1 = on.USB & NIC Power Management
🔹
powercfg /setacvalueindex SCHEME_CURRENT 2a737441-1930-4402-8d77-b2bebba308a3 48e6b7a6-50f5-4782-a5d4-53bb8f07e226 0 powercfg /setactive SCHEME_CURRENT
Disables USB selective suspend on AC power. Stops peripherals from dropping.
🔹
Get-NetAdapter -Name $Adapter | Set-NetAdapterPowerManagement -WakeOnMagicPacket Disabled -WakeOnPattern Disabled -SelectiveSuspend Disabled
powercfg /setactive SCHEME_CURRENT
Disables NIC power saving. Prevents RDP and Teams disconnects.
🔹
$nics = Get-NetAdapter | Where-Object {$_.Status -eq "Up"}
foreach ($nic in $nics) {
Set-NetAdapterPowerManagement -Name $nic.Name -WakeOnMagicPacket Disabled -WakeOnPattern Disabled -ErrorAction SilentlyContinue
}
powercfg /setactive SCHEME_CURRENT
Disables Wake-on-LAN on all active NICs.
Screen Lock & Idle Settings
🔹
reg add "HKCU\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d $Seconds /f
Sets screen saver idle timeout in seconds.
🔹
reg add "HKCU\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 0 /f
Disables the screen saver.
🔹
powercfg /setacvalueindex SCHEME_CURRENT SUB_VIDEO VIDEOIDLE $Seconds
powercfg /setactive SCHEME_CURRENT
Sets display-off timeout.
🔹
reg add "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v NoLockScreen /t REG_DWORD /d 1 /f
Hides the lock screen on sign-in and wake. Does not remove the password prompt.
🔹
powercfg /setacvalueindex SCHEME_CURRENT SUB_NONE CONSOLELOCK 0
powercfg /setactive SCHEME_CURRENT
Disables the password-on-wake requirement for AC power.
Windows Update & M365 Background Issues
🔹
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization" /v DODownloadMode /t REG_DWORD /d 0 /f
Disables Delivery Optimisation P2P bandwidth usage.
🔹
reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v ActiveHoursStart /t REG_DWORD /d $StartHour /f
reg add "HKLM\SOFTWARE\Microsoft\WindowsUpdate\UX\Settings" /v ActiveHoursEnd /t REG_DWORD /d $EndHour /f
Sets Windows Update active hours.
🔹
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
Prevents automatic reboots while a user is logged in.
🔹
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\MSTeams_PackageID" /v Disabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\MSTeams_PackageID" /v DisabledByUser /t REG_DWORD /d 0 /f
Stops Battery Saver from suspending Teams, preventing missed calls.
🔹
Get-Process -Name OneDrive -ErrorAction SilentlyContinue | Select-Object Name, CPU, WorkingSet
Checks if OneDrive is running. High CPU may indicate a stuck sync.
🔹
Stop-Process -Name OneDrive -Force -ErrorAction SilentlyContinue
Start-Sleep -Seconds 3
Start-Process "C:\Users\username\AppData\Local\Microsoft\OneDrive\OneDrive.exe"
Restarts OneDrive to fix stuck sync.
Power Diagnostics & Reporting
🔹
powercfg /energy /output $Output
Runs a 60-second trace and outputs an HTML power diagnostics report.
🔹
powercfg /sleepstudy /output $Output
Generates a 3-day sleep history report.
🔹
powercfg /requests
Shows processes currently preventing sleep.
🔹
powercfg /waketimers
Lists wake timers that will wake the machine from sleep.
🔹
powercfg /lastwake
Shows what last woke the machine.
🔹
powercfg /devicequery wake_armed
Lists devices that are allowed to wake the system.
🔹
powercfg /batteryreport /output $Output
Generates a battery health report including design vs actual capacity.
🔐 Run As & Credentials
Run commands or open sessions as a different user. Useful for IT admins needing to execute privileged commands without logging off, or authenticate against remote systems interactively.
Run As in CMD / PowerShell
🔹
runas /user:$Domain\$User powershell.exeOpens a new PowerShell window as a different user. You are prompted for the password interactively.
🔹
runas /user:$Domain\$User /netonly powershell.exe/netonly — runs the process locally as your current user but uses the alternate credentials for all network connections. Ideal for accessing remote resources (AD, Exchange, file shares) without a full session switch.🔹
runas /user:$Domain\$User cmd.exeOpens a CMD prompt as the specified user.
Storing Credentials in PowerShell
🔹
$Cred = Get-CredentialPrompts for a username and password and stores them as a
PSCredential object. Pass $Cred into any cmdlet that accepts -Credential.🔹
$Cred = Get-Credential -UserName $Username -Message "Enter admin credentials"Pre-fills the username in the prompt. Useful in scripts where the account is known but a secure password entry is still required.
Start-Process As Another User
🔹
Start-Process powershell.exe -Credential $Cred -NoNewWindowLaunches PowerShell as the credential user. Combine with
-ArgumentList to run a specific command.🔹
Start-Process powershell.exe -Credential $Cred -ArgumentList "-Command $Command"Runs a specific PowerShell command as another user in a new process.
Interactive Remote Session
🔹
Enter-PSSession -ComputerName $Computer -Credential $CredOpens a live interactive PowerShell session on a remote machine. Your prompt changes to the remote host — works like SSH for Windows.
🔹
Exit-PSSessionExits the interactive remote session and returns to your local shell.
🔹
Invoke-Command -ComputerName $Computer -Credential $Cred -ScriptBlock { $Commands }Runs commands on a remote machine non-interactively. Results are returned to your local session.
🔹
$Session = New-PSSession -ComputerName $Computer -Credential $Cred
Invoke-Command -Session $Session -ScriptBlock { $Commands }
Remove-PSSession $SessionCreates a persistent reusable session, runs commands against it, then cleans up. More efficient than repeated one-off
Invoke-Command calls.Note: WinRM must be enabled on the target machine for remote sessions. Run
Enable-PSRemoting -Force on the remote machine as an administrator to enable it.📜 PS1 Scripts Library
Add your
Saving generates a new HTML as these are saved within the file.
Tags are formatted in exact naming convention broke by ", ".
.ps1 files below with a short description of what each one does.Saving generates a new HTML as these are saved within the file.
Tags are formatted in exact naming convention broke by ", ".
Drop
.ps1 files here to add themYou'll be prompted for a description and category tag
Get-SystemInfo.ps1
Outputs OS version, CPU, RAM and disk info to the console.
# Get-SystemInfo.ps1
# Outputs basic system information
$os = Get-CimInstance Win32_OperatingSystem
$cpu = Get-CimInstance Win32_Processor
$disk = Get-PSDrive C
Write-Host "OS: $($os.Caption) $($os.Version)"
Write-Host "CPU: $($cpu.Name)"
Write-Host "RAM: $([math]::Round($os.TotalVisibleMemorySize/1MB, 1)) GB"
Write-Host "Disk: $([math]::Round($disk.Used/1GB,1)) GB used of $([math]::Round(($disk.Used+$disk.Free)/1GB,1)) GB"
Hiberboot.ps1
Turns off Hiberboot (Fastboot) Via Reg-Key
$path = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power"
$name = "HiberbootEnabled"
Write-Host "Checking Fast Startup status (HiberbootEnabled) at $path..." -ForegroundColor Yellow
$current = Get-ItemProperty -Path $path -Name $name -ErrorAction SilentlyContinue
if ($current.$name -eq 1) {
Write-Host "Fast Startup is ENABLED (value: $($current.$name)). Disabling..." -ForegroundColor Red
Set-ItemProperty -Path $path -Name $name -Value 0
Write-Host "SUCCESS: Set to 0. Restart required for full effect." -ForegroundColor Green
} elseif ($current.$name -eq 0) {
Write-Host "Fast Startup is already DISABLED (value: $($current.$name)). No changes needed." -ForegroundColor Green
} else {
Write-Host "Key not found or unexpected value ($($current.$name)). Skipping." -ForegroundColor Yellow
}
MailTip.ps1
Example use of adding a MailTip.
# Connect to Exchange Online Connect-ExchangeOnline -UserPrincipalName "[email protected]" -ShowProgress $true # Specify the mailbox and MailTip message $MailboxEmailAddress = "[email protected]" $MailtipMessage = "This mailbox is monitored Mon-Fri, 9am-5pm. For urgent queries, call 0800 000 000." # Set the MailTip Set-Mailbox -Identity $MailboxEmailAddress -MailTip $MailtipMessage # Disconnect Disconnect-ExchangeOnline -Confirm:$false
FileTimeConverter_fixed.ps1
Converts file-time (raw data) to a legible date and vice-versa
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
# =========================
# Native drag support
# - Declare once; skip if already defined (re-runs in the same session)
# =========================
if (-not ("NativeMethods" -as [type])) {
$sig = @"
using System;
using System.Runtime.InteropServices;
public static class NativeMethods {
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HTCAPTION = 0x2;
[DllImport("user32.dll")]
public static extern bool ReleaseCapture();
[DllImport("user32.dll")]
public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, int lParam);
}
"@
Add-Type -TypeDefinition $sig -Language CSharp
}
# Helper scriptblock to initiate a native drag (call from MouseDown)
$startDrag = {
[NativeMethods]::ReleaseCapture() | Out-Null
[NativeMethods]::SendMessage($form.Handle, [NativeMethods]::WM_NCLBUTTONDOWN, [NativeMethods]::HTCAPTION, 0) | Out-Null
}
# =========================
# Theme colors to match banner
# =========================
$colorFormBg = [System.Drawing.Color]::FromArgb(34,34,34)
$colorPanelBg = [System.Drawing.Color]::FromArgb(45,45,45)
$colorText = [System.Drawing.Color]::White
$colorButton = [System.Drawing.Color]::FromArgb(52,152,219)
$colorModeOn = [System.Drawing.Color]::FromArgb(200,200,200)
$colorModeOff = [System.Drawing.Color]::LightGray
# =========================
# Form (borderless, topmost)
# =========================
$form = New-Object System.Windows.Forms.Form
$form.Text = ""
$form.FormBorderStyle = [System.Windows.Forms.FormBorderStyle]::None
$form.StartPosition = "CenterScreen"
$form.BackColor = $colorFormBg
$form.Size = New-Object System.Drawing.Size(340, 280)
$form.TopMost = $true
# Let the bare form surface start a drag on left click
$form.Add_MouseDown({
param($s,$e)
if ($e.Button -eq [System.Windows.Forms.MouseButtons]::Left) { & $startDrag }
})
# =========================
# Banner (340px, 194px)
# =========================
$banner = New-Object System.Windows.Forms.PictureBox
$banner.Location = New-Object System.Drawing.Point(0,0)
$banner.Size = New-Object System.Drawing.Size(340, 89)
$banner.BackColor = [System.Drawing.Color]::Black
$banner.SizeMode = [System.Windows.Forms.PictureBoxSizeMode]::Zoom
$banner.Anchor = 'Top,Left,Right'
# Embedded C5 Alliance logo (Base64 - self-contained)
$logoB64 = @'
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQIBAQEBAQIBAQECAgICAgICAgIDAwQDAwMDAwICAwQDAwQEBAQEAgMFBQQEBQQEBAT/2wBDAQEBAQEBAQIBAQIEAwIDBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAT/wAARCADbA0IDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD/AD/6ACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAPoL4ZfArXfHjQ6rq2/QPCu3zftjQ/6fqMfT/RYvw/1svH/AF06UAfefhfwl4f8HaXDo/h/To7GziAEpT/j4vH6CWWb/lpJQB0dABQAUAFABQAUAFABQAUAfjPQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAa2k6Nqmvahb6VothcalqV3J5drZWkXnTzH2oA+4/hh+zrpWg/Zdc8cx22s62B5sejA+fpGnHnmUf8vEv/kH08z/AFlAH06q7RigB1ABQAUAFABQAUAFABQAUAFAH4z0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAev/Df4QeJviJOk1tF/ZegRTeVda/eRfuBj/lnFH/y0k9hQB9/+B/h34Z+H9gLTQrQfaZ4v9O1Scedqeo8k4llHQcn9yKAO6oAKACgAoAKACgAoAKACgAoAKACgD8Z6ACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgC3a2tzezw21pDJcXU8vlW8EEfnTTP6AdaAPsX4Yfs3bhb698RIyBgS2vhaOUDOP8An8l/9pRZPuf9VQB9gWtra2FvDZ2dtb2dtbxeTa29vF5EEMf/AExioAsUAFABQAUAFABQAUAFABQAUAFABQAUAfjPQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB6H4I+HXiX4gagLLQrDdbRv/AKfqk7GDStNHXMs34/6sfvDxxQB9/fDj4ReGvh3bpLbwnVfEDxmO5168j/ejOB5UMP8Ayzj4HPtQB6vQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH4z0AFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFADlXdQB9S/DD9nfU9f+za340WfRdEI82LTDmHVdQTIP73/n3j45z+8+Y4HQ0Afb2kaRpeg2Nvpmj2MGn6fax+XbWtrH5UTE8kmgDToAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/GegAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgDp/C/hTX/GWpx6R4e06fUbx8GQRoTb2qZ5lmlxiOMZ6mgD72+GPwH8PeBhb6rq4g13xQn7z7XLHnS9IcdPssUmOf+m0w7f8sqAPe6ACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/GegAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAPfvhj8C/EHjprfUtSD6H4Vf97/aUkOL7Uo+/wBkh9Of9cf3Y/6adKAPvXwr4S8PeC9LTR/D+mpYW8Y82WXrPeSDpLNN/wAtKAOloAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoA/GegAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgDV0nSNS1y/ttK0ezudS1K8k8q2srSLzp5j7UAfb3ww/Zy07RPs2t+OVg1nWP9ZFof8Ar9K01+uJh/y8Se3+p/660AfUe1E+RD5aR9fegB1ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB+M9ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAeufDf4SeJfiNdJJaQ/2doUc3k3evXkf+jRHvHF/z0k9hQB+gHgX4c+Gfh9Y/ZNCswLy4ixfaxeDztT1Hv+9lHTqf3MNAHeUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfjPQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQBctrea6nitrWGW4uJ5PKiggi86aV8/wDLMAZ9KAPr74Zfs2tKbfXPiJFJHHkSWnhe2lxNLgAD7XL/AO0osn3P+qIB9jWtrbWNvDZ2dtbWdnbxeVa29vF5EEEf/PKGGgCxQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAfjPQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAHoHgn4eeJfH2o/YdA053hj/AOP/AFOdvI0rTh1/fTf+0x+8PYUAff3w3+EHhr4eQR3Ma/2r4heLy7rXLyHE0JP/ACztIv8AlnGfU88UAetUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAN3r6/pQAb19f0oAdQB+M9ABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQB9R/DH9nnVPEjW2ueMFn0TQBiWHSiPK1rU0Hcg/6iMnOc/veTwB+8AB9w6Lo2l+HrC30vRbGDS9OtIzGkEEeYWPr/8AbqANSgAoAKACgAoAKAPZ/gZ+zv8AHH9pnx1Z/DT4BfC7xf8AFbxteHzP7D8IaNLffY4z0utRm/1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W1u/L/dXNtNLDD5trN5sUvkxfuqAPrD4/f8FX/wDgob+098PdY+FHxv8A2nvGni/4deIY7e21/wAJ2egaD4O0vX47OWGaKK7/ALJsbb7TF5kMMvlTf62WGgDyb9mL9u39rn9jK81K7/Zn+O/jf4WW2sXQ1DWPD+ny2uu+DtXuRH5MN3d6HexXOn3Moj/dedNa+bQB7N8dv+Cuf/BR39pTwbrPw7+MH7VPjbXvA3iWxk03xD4Y8P6LoHw50vxFaTArLbahFotjY/aLaYHE0Uv7qUGgD85KACgAoAi3/M47/wCcUAG75s9ulBzjN27nOe3TFVD4kARnc3TpWwFjanp/47mg5z8Z65z0AoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAPpz4Yfs+6x4r+za34rE+g+HZB5sdltEOs6wnGSAf9VEcf62X9B+8oA+5dB0HR/DOm22j6Dp1vpum2/wDqre3i6/8ATWb/AJ6S/wDTWgDXoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKAKjNjgdf5UEz+FjFkcZ7fjQYk1dBU/iZZhj3fjzQc8/iZZ+z+7flQSfi7XOegFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFAH1H+zLoGi6z4j1G+1XTrbULjSbSO7043SebFayGSX5ljPyE8DqDigD71oAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAqkfMv40Ez+FjY+9BiXKrnkVP4mTQ/dSjnkc8/iZoJ9xf90fyqTn55H//Z
'@
$logoBytes = [System.Convert]::FromBase64String($logoB64.Trim())
$logoStream = New-Object System.IO.MemoryStream(,$logoBytes)
$logoBitmap = New-Object System.Drawing.Bitmap($logoStream)
$banner.Image = $logoBitmap
$form.Controls.Add($banner)
# Allow dragging from the banner
$banner.Add_MouseDown({
param($s,$e)
if ($e.Button -eq [System.Windows.Forms.MouseButtons]::Left) { & $startDrag }
})
# =========================
# Close button (X), top-right
# =========================
$btnClose = New-Object System.Windows.Forms.Button
$btnClose.Text = "X"
$btnClose.Font = New-Object System.Drawing.Font("Segoe UI", 10, [System.Drawing.FontStyle]::Bold)
$btnClose.Size = New-Object System.Drawing.Size(28, 24)
$btnClose.FlatStyle = 'Flat'
$btnClose.BackColor = [System.Drawing.Color]::FromArgb(30,30,30)
$btnClose.ForeColor = [System.Drawing.Color]::White
$btnClose.TabStop = $false
$btnClose.Anchor = 'Top,Right'
$btnClose.Add_Click({ $form.Close() })
$form.Controls.Add($btnClose)
# Position and z-order of the close button after form is shown
$form.Add_Shown({
$btnClose.Location = New-Object System.Drawing.Point(($form.ClientSize.Width - 30), 4)
$btnClose.BringToFront()
})
# =========================
# Content panel under the banner
# =========================
$panel = New-Object System.Windows.Forms.Panel
$panel.Location = New-Object System.Drawing.Point(0, 89)
$panel.Size = New-Object System.Drawing.Size(340, 191)
$panel.BackColor = $colorPanelBg
$form.Controls.Add($panel)
function NewLabel([string]$text, [int]$x, [int]$y) {
$lbl = New-Object System.Windows.Forms.Label
$lbl.Text = $text
$lbl.Location = New-Object System.Drawing.Point($x, $y)
$lbl.Font = New-Object System.Drawing.Font("Segoe UI", 10)
$lbl.AutoSize = $true
$lbl.ForeColor = $colorText
return $lbl
}
# =========================
# Inputs
# =========================
$panel.Controls.Add((NewLabel "Select Date:" 22 12))
$datePicker = New-Object System.Windows.Forms.DateTimePicker
$datePicker.Format = 'Short'
$datePicker.Location = New-Object System.Drawing.Point(110, 10)
$datePicker.Width = 160
$panel.Controls.Add($datePicker)
$panel.Controls.Add((NewLabel "Select Time:" 22 46))
$timePicker = New-Object System.Windows.Forms.DateTimePicker
$timePicker.Format = 'Time'
$timePicker.ShowUpDown = $true
$timePicker.Width = 160
$timePicker.Location = New-Object System.Drawing.Point(110, 44)
$panel.Controls.Add($timePicker)
# =========================
# Mode toggle and Convert
# =========================
$modeButton = New-Object System.Windows.Forms.Button
$modeButton.Size = New-Object System.Drawing.Size(160, 28)
$modeButton.Location = New-Object System.Drawing.Point(85, 78)
$modeButton.Font = New-Object System.Drawing.Font("Segoe UI", 9, [System.Drawing.FontStyle]::Bold)
$panel.Controls.Add($modeButton)
$convertButton = New-Object System.Windows.Forms.Button
$convertButton.Text = "Convert"
$convertButton.Size = New-Object System.Drawing.Size(90, 28)
$convertButton.Location = New-Object System.Drawing.Point(122, 112)
$convertButton.Font = New-Object System.Drawing.Font("Segoe UI", 10, [System.Drawing.FontStyle]::Bold)
$convertButton.BackColor = $colorButton
$convertButton.ForeColor = [System.Drawing.Color]::White
$convertButton.FlatStyle = 'Flat'
$panel.Controls.Add($convertButton)
$outputBox = New-Object System.Windows.Forms.TextBox
$outputBox.ReadOnly = $true
$outputBox.Size = New-Object System.Drawing.Size(245, 20)
$outputBox.Font = New-Object System.Drawing.Font("Consolas", 11)
$outputBox.Location = New-Object System.Drawing.Point(47, 150)
$panel.Controls.Add($outputBox)
# =========================
# Logic: UTC/UK toggle and conversion
# =========================
$script:useUtc = $true
function ConvertToFileTime {
param([datetime]$dateTime, [bool]$toUtc)
if ($toUtc) {
$dtUtc = [DateTime]::SpecifyKind($dateTime, [DateTimeKind]::Utc)
} else {
$ukTz = [System.TimeZoneInfo]::FindSystemTimeZoneById("GMT Standard Time")
$dtUtc = [System.TimeZoneInfo]::ConvertTimeToUtc($dateTime, $ukTz)
}
return $dtUtc.ToFileTimeUtc()
}
$modeButton.remove_Click($null)
$updateModeUi = {
if ($script:useUtc) {
$modeButton.Text = "Mode: UTC File Time"
$modeButton.BackColor = $colorModeOff
$modeButton.ForeColor = [System.Drawing.Color]::Black
} else {
$modeButton.Text = "Mode: UK File Time"
$modeButton.BackColor = $colorModeOn
$modeButton.ForeColor = [System.Drawing.Color]::Black
}
}
& $updateModeUi
$modeButton.Add_Click({
$script:useUtc = -not $script:useUtc
& $updateModeUi
})
$convertButton.Add_Click({
$date = $datePicker.Value.Date
$t = $timePicker.Value
$dt = New-Object DateTime($date.Year, $date.Month, $date.Day, $t.Hour, $t.Minute, $t.Second, [DateTimeKind]::Unspecified)
$outputBox.Text = (ConvertToFileTime -dateTime $dt -toUtc:$script:useUtc)
})
$form.ShowDialog()NativeMessaging.ps1
Turns off Native Messaging Via Reg-key
$path = "HKLM:\SOFTWARE\Policies\Microsoft\Edge"
$name = "NativeMessagingUserLevelHosts"
$current = Get-ItemProperty -Path $path -Name $name -ErrorAction SilentlyContinue
if ($current.$name -eq 1) { Set-ItemProperty -Path $path -Name $name -Value 0 }
NIC disable power-saving.ps1
Queries then disables windows ability to manage the NIC's power-state.
# Disable NIC power saving
$adapters = Get-WmiObject Win32_NetworkAdapter | Where-Object { $_.PhysicalAdapter -eq $true -and $_.NetConnectionID -and $_.ConfigManagerErrorCode -eq 0 }
foreach ($adapter in $adapters) {
$deviceID = "{4d36e972-e325-11ce-bfc1-08002be10318}"
$regPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Class\$deviceID\$($adapter.DeviceID.ToString('D4'))"
if (Test-Path $regPath) {
Set-ItemProperty -Path $regPath -Name "PnPCapabilities" -Value 24 -Type DWord
Write-Output "Disabled power saving on $($adapter.Name)"
}
}
Add Printer.ps1
Example of adding a printer
Add-PrinterPort -Name "IP_192.168.1.97" -PrinterHostAddress "192.168.1.97" -PortNumber 9100 Add-Printer -Name "Office Printer" -DriverName "Canon Office XPS Class Driver" -PortName "IP_192.168.1.97"
Remove Printer.ps1
Example of removing a printer
$ip = "192.168.1.97"
$ports = Get-PrinterPort | Where-Object { $_.PrinterHostAddress -like "*$ip*" -or $_.Name -like "*$ip*" }
if ($ports) { $ports | Remove-PrinterPort -ErrorAction SilentlyContinue }
$printers = Get-Printer | Where-Object { $_.PortName -in $ports.Name }
if ($printers) { $printers | Remove-Printer }
Replace Printer.ps1
Example of replacing printer
# OakPC01 Printer Replacement Script for Intune
$PrinterName = 'OAKPrint01'
$PrinterIP = '10.100.3.251'
$PortName = "IP_$PrinterIP"
$NewDriverName = 'Canon Generic Plus PCL6'
$INFPaths = @('.\driver1.inf', '.\driver2.inf', '.\driver3.inf')
# Restart Spooler
Restart-Service -Name Spooler -Force -ErrorAction SilentlyContinue
#Remove if exists
$ExistingPrinter = Get-Printer -Name $PrinterName -ErrorAction SilentlyContinue
if ($ExistingPrinter) {
Remove-Printer -Name $PrinterName -ErrorAction Stop
Write-Output "Removed existing $PrinterName"
}
# Remove port if exists
$ExistingPort = Get-PrinterPort -Name $PortName -ErrorAction SilentlyContinue
if ($ExistingPort) {
Remove-PrinterPort -Name $PortName -ErrorAction Stop
Write-Output "Removed existing port $PortName"
}
# Install new drivers silently
foreach ($INF in $INFPaths) {
if (Test-Path $INF) {
$result = & pnputil.exe /add-driver $INF /install /quiet 2>&1
if ($LASTEXITCODE -eq 0) {
Write-Output "Installed driver from $INF"
} else {
Write-Error "Failed to install $INF : $result"
exit 1
}
} else {
Write-Error "INF not found: $INF"
exit 1
}
}
# Create port
Add-PrinterPort -Name $PortName -PrinterHostAddress $PrinterIP -PortNumber 9100
Write-Output "Created port $PortName"
# Add printer with new driver
Add-Printer -Name $PrinterName -DriverName $NewDriverName -PortName $PortName
Write-Output "Added $PrinterName with $NewDriverName"
# Restart Spooler
Restart-Service -Name Spooler -Force
Write-Output "Script completed successfully"
exit 0
Windows hosts file.ps1
Adds a local record to the host file (writes over existing)
$hostsPath = "$env:SystemRoot\System32\drivers\etc\hosts"
$ip = "127.0.0.1" # Change this
$hostName = "example.com" # Change this
$entry = "$ip $hostName"
if (Test-Path $hostsPath) {
$content = Get-Content $hostsPath | Where-Object { $_ -notmatch '^#' -and $_ -match "\s+$hostName\$" }
if (-not $content) {
Add-Content -Path $hostsPath -Value $entry -Encoding UTF8
Write-Output "Added $entry to hosts file."
} else {
Write-Output "Entry for $hostName already exists."
}
} else {
Write-Error "Hosts file not found."
}
File Path Too Long.ps1
Looks for files over a file path length in a location
param(
[switch]$s
)
# Define the base directory to search in
$baseDir = "C:\Documents" # Change this path as needed
# Define the maximum path length
$maxLength = 400
# Define the log file path
$logFile = "C:\temp\long_paths_log.txt"
# Ensure the log directory exists
if (-not (Test-Path "C:\temp")) {
New-Item -ItemType Directory -Path "C:\temp"
}
# Start the transcript for logging
Start-Transcript -Path $logFile
# Start the process of finding long paths
Write-Host "Searching for files with paths longer than $maxLength characters in $baseDir..."
# Get all files recursively in the base directory
try {
$longFiles = Get-ChildItem -Path $baseDir -Recurse -File -ErrorAction SilentlyContinue | Where-Object { $_.FullName.Length -gt $maxLength }
} catch {
Write-Host "An error occurred while accessing the directory: $_"
}
# Check if there are any long paths
if ($longFiles.Count -gt 0) {
Write-Host "Files found with paths longer than $maxLength characters. Listing them below:"
$longFiles | ForEach-Object { Write-Host $_.FullName }
} else {
Write-Host "No files found with paths exceeding $maxLength characters."
}
# Handle the -s switch if provided
if ($s) {
Write-Host "Switch -s detected. Running additional logic..."
# Add your custom logic for the -s switch here
}
# End the output redirection
Stop-Transcript
Write-Host "Log has been saved to $logFile"
Remove App By Name.ps1
Removes a app by name, can be used following a query of the installed apps if needed.
$app = Get-WmiObject -Class Win32_Product | Where-Object {
$_.Name -match "APP NAME"
}
$app.Uninstall()