Move CD-Drive Letter in Lab

1..26 | % { Invoke-Command -ComputerName “LABNAME-C$($_)” -ScriptBlock { Get-WmiObject -Class Win32_volume -Filter “DriveLetter = “”$(Get-Volume | ? { $_.DriveType -eq “CD-ROM” } | select -ExpandProperty DriveLetter | select...

Select only 25 Active Emails as CSV

$mail = @(); $teachers = Get-ADUser -filter { mail -like “*@localdomain.com” } -Properties mail | ? { $_.Enabled -eq $True } | select mail | select -First 25 | % { $mail += $_.mail }; $mail -join “,” | clip $mail = @(); $teachers = Get-ADUser...

Powershell Detection Method Uninstaller

There is no detection method logic to check that a file doesn’t exist for a required Application. You have two options to accomplish this: 1. You run a script that creates a file after the uninstall if complete. Then use the file as a detection method. 2. Run a...