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 Remove-PrintersFromComputers { | |
<# | |
Remove-PrintersFromComputers -PrinterToExclude "Printer1, Printer2, *Printer4*" -ComputerName "Computer1" | |
#> | |
[CmdletBinding()] | |
Param( | |
[String]$ComputerName = "localhost", | |
[String]$PrinterToExclude |
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 Unlock-ADAccounts { | |
#[CmdletBinding()] | |
#Param( | |
# [Parameter(Mandatory = $true)][array]$UserNames = | |
#) | |
[string]$UserNames = Read-Host -Prompt "What users do you want to check? (separate the users with ,)" | |
[array]$UserNames = $UserNames -split "," | |
# Checks if the Active Directory module are loaded if it's not then it imports it. | |
if (-Not(Get-Module -ListAvailable -Name "ActiveDirectory")) { | |
try { |