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
#requires -version 2 | |
<# | |
.SYNOPSIS | |
<Overview of script> | |
.DESCRIPTION | |
<Brief description of script> | |
.PARAMETER <Parameter_Name> | |
<Brief description of parameter input required. Repeat this attribute if required> |
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
# Finds Regkey for CCleaner Malware in v5.33. 2017-09-18 | |
# Read More Here: http://blog.talosintelligence.com/2017/09/avast-distributes-malware.html | |
$Computers = Get-AdComputer -filter #Put your filter here. | |
$cred = Get-Credential | |
$logpath = $env:USERPROFILE+"\desktop\ccleaner-malware.csv" | |
foreach ($Computer in $Computers) { | |
if($(Test-NetConnection $computer.name).PingSucceeded){ | |
$WinRM = Get-Service -Name WinRM -ComputerName $computer.name |
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
if ($i -eq $null) {$i = 8080} | |
$i++ | |
$Colors = @{ | |
BackgroundColor = "#12A5EC" | |
FontColor = "#FFFFFFFF" | |
} | |
$Data = @(); | |
$Data += [PSCustomObject]@{"DataName" = "DataSet 1"; "Dogs" = 54; "Cats" = 23; "Birds" = 12} |
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
# Com Object for making SNMP calls | |
$SNMP = new-object -ComObject olePrn.OleSNMP | |
# Printer objects from our print server | |
$All_Printers = get-printer -ComputerName $Config.PrintServer | |
# Array of printers to output, which will contain toner data, and some data from our print server. | |
$Printers = New-Object System.Collections.ArrayList |
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
[CmdletBinding()] | |
param ( | |
# Name | |
[Parameter(Mandatory)] | |
[string] | |
$Name, | |
# Date | |
[Parameter()] | |
[String] | |
$Date = (Get-Date -Format yyyy-M-d), |
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 Send-GHCWebhookMessage { | |
[CmdletBinding()] | |
param ( | |
# uri | |
[Parameter(Mandatory)] | |
[string] | |
$URI, | |
# Message | |
[Parameter(Mandatory)] | |
[string] |
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 Test-DC { | |
param ( | |
# Parameter help description | |
[Parameter()] | |
[int] | |
$DC, | |
[Parameter()] | |
[int] | |
$Bonus, | |
[Parameter()] |
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-ADUserFromGroup { | |
[CmdletBinding()] | |
param ( | |
[Parameter(mandatory)] | |
[string] | |
$identity, | |
[Parameter(mandatory)] | |
[string] | |
$credential | |
) |
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
<# | |
The CSV should have a list of serialnumbers | |
#> | |
$CSV = "~\Desktop\devices.csv" | |
$Devices = Import-Csv $CSV | |
$OU = "" | |
foreach ($SerialNumber in $Devices) { | |
Write-Host "Modifying " $Item "to $OU" -ForegroundColor Green |
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-Symbols { | |
param( | |
[string] | |
$string | |
) | |
[regex]$reg = "[^\p{L}\p{Nd}]" | |
return $string -replace $reg | |
} |
OlderNewer