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
<# | |
.DESCRIPTION | |
The script uses a COM object to interact with the Windows Update service, searching for any updates that are currently available but not installed. If no updates are pending, it confirms the system is up to date. Otherwise, it lists all pending updates by title. | |
#> | |
# Create a COM object for Windows Update Session | |
$UpdateSession = New-Object -ComObject "Microsoft.Update.Session" | |
$UpdateSearcher = $UpdateSession.CreateUpdateSearcher() | |
# Search for pending updates |
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
# Check for Office Click-To-Run Products | |
$officeC2R = Get-ItemProperty HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*,HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object {$_.DisplayName -like "*Microsoft Office Professional Plus 2019*" -or $_.DisplayName -like "*Microsoft Office Professional Plus 2021*" -or $_.DisplayName -like "*Microsoft Office 365*" -or $_.DisplayName -like "*Microsoft 365*"} | |
# Update Click-To-Run Office Products (Office 2019, 2021, 365, etc) | |
if ($officeC2R -ne $null) { | |
if (Test-Path "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe") { | |
Write-Output "Click-To-Run Office detected. Initiating update." | |
& "C:\Program Files\Common Files\microsoft shared\ClickToRun\OfficeC2RClient.exe" /update user displaylevel=false forceappshutdown=true | |
} | |
else { |
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
$folders = @( | |
"C:\Program Files\WindowsPowerShell\Modules\PackageManagement\1.0.0.1", | |
"C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1", | |
"C:\Program Files (x86)\WindowsPowerShell\Modules\PackageManagement\1.0.0.1", | |
"C:\Program Files (x86)\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1" | |
) | |
foreach ($folder in $folders) { | |
if (Test-Path $folder) { | |
Write-Host "Deleting folder: $folder" |
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
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted | |
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force | |
Start-Sleep -Seconds 60 | |
Install-Module -Name PowerShellGet -Force | |
Install-Module -Name HPCMSL -SkipPublisherCheck -AcceptLicense -Force | |
Import-Module -Name HPCMSL | |
Write-Host "HP Client Management Script Library installation complete." |
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
<#Detection on CI: | |
#Requires HPCMSL already Installed. | |
$HPCMSLVers = Get-InstalledModule -Name "HPCMSL" -ErrorAction SilentlyContinue | |
if ((Get-CimInstance -Namespace root/cimv2 -ClassName Win32_ComputerSystem).Manufacturer -like "H*"){$IsHP = $true} | |
if ($HPCMSLVers -ne $Null -and $IsHP -eq $true) | |
{ | |
Write-Output "HP with HPCMSL" | |
} | |
#> |
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
# Define the paths for both x64 and x86 versions of the Dell Command Update CLI | |
$dcuPathX64 = "${env:ProgramFiles}\Dell\CommandUpdate\dcu-cli.exe" | |
$dcuPathX86 = "${env:ProgramFilesX86}\Dell\CommandUpdate\dcu-cli.exe" | |
# Check if Dell Command Update is installed (either x64 or x86) | |
$dcuPath = if (Test-Path $dcuPathX64) { | |
$dcuPathX64 | |
} elseif (Test-Path $dcuPathX86) { | |
$dcuPathX86 | |
} else { |
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 | |
This script configures the PowerShell environment for removing Visual C++ Redistributables. | |
It installs the NuGet package provider and the VcRedist module, and then removes specific versions of Visual C++ Redistributables. | |
.DESCRIPTION | |
The script sets the execution policy to Bypass for the current process, installs NuGet and VcRedist modules, and uninstalls specific versions of Visual C++ Redistributables (2005, 2008, 2010, 2012). It ends by listing all installed Visual C++ Redistributables. | |
.NOTES | |
Requires administrative permissions |
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
<# | |
.DESCRIPTION | |
This script gathers information about connected monitors and allows the user to assign asset tags. This can be used with a USB or network drive. | |
The script retrieves details of each monitor connected to the system, such as the manufacturer, name, serial number, week of manufacture, and year of manufacture. It prompts the user to input an asset tag number for each monitor. The collected data, including the asset tags, are then appended to a CSV file. | |
.PARAMETERS | |
The script uses hardcoded CSV file path which can be adjusted as needed. | |
.EXAMPLE | |
.\Monitor-Serials.ps1 |
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
<# | |
.Description | |
Clears Teams Cache. | |
.Source | |
https://commsverse.blog/2018/09/28/clear-the-microsoft-teams-client-cache/ | |
#> | |
$challenge = Read-Host "Are you sure you want to delete Teams Cache (Y/N)?" | |
$challenge = $challenge.ToUpper() |
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
md c:\HWID | |
Set-Location c:\HWID | |
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted -Force | |
Install-Script -Name Get-WindowsAutopilotInfo -Force | |
$env:Path += ";C:\Program Files\WindowsPowerShell\Scripts" | |
Get-WindowsAutopilotInfo.ps1 -OutputFile AutopilotHWID.csv |
NewerOlder