This file contains hidden or 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
#!/bin/bash -- | |
#sqlite3 Needed. places.sqlite file needs to be copied in the folder | |
cd ./Linux | |
echo 'select url from moz_places;' | sqlite3 places.sqlite > B4Clean.txt | |
echo 'DELETE from moz_places where url Not Like "%Something%" AND url Not Like "%SomethingElse%";' | sqlite3 places.sqlite |
This file contains hidden or 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
$ScriptDir = Split-Path $MyInvocation.MyCommand.Path | |
$targetmachines = get-content $Scriptdir\serverlist.txt | |
# SourceInstallerFiles folder has to be placed with all Source Installer Binaries including the Installer.bat | |
foreach ($targetMachine in $targetmachines) { | |
Copy-item "$Scriptdir\SourceInstallerFiles" -Container -Destination "\\$targetMachine\C$" -recurse -force | |
$InstallString = "c:\SourceInstallerFiles\Installer.bat" |
This file contains hidden or 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 Run-Threaded { | |
#.Synopsis | |
# This is a quick and open-ended script multi-threader searcher | |
# | |
#.Description | |
# This script will allow any general, external script to be multithreaded by providing a single | |
# argument to that script and opening it in a seperate thread. It works as a filter in the | |
# pipeline, or as a standalone script. It will read the argument either from the pipeline | |
# or from a filename provided. It will send the results of the child script down the pipeline, |
This file contains hidden or 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
#Place all your code in the MyCustomScript. Do Remember to Include Valid Params | |
$MyCustomScript = { | |
Param($ComputerName = "LocalHost") | |
Get-HotFix -ComputerName $ComputerName | Where-Object {$_.HotFixID -like "*KB4012*"} | |
} | |
$Computers = Get-Content "C:\temp\ServerList.txt" |
This file contains hidden or 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
# NEEDED FUNCTIONS AND SUBS | |
Function addUser2Group([string]$user, [string]$group, [switch]$domainUser) | |
{ | |
$cname = gc env:computername | |
try | |
{ | |
if($domainUser) | |
{ | |
$domainName = gc env:userdomain |
This file contains hidden or 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
$servers = @('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n') | |
foreach ($server in $servers) { | |
$running = @(Get-Job | Where-Object { $_.State -eq 'Running' }) | |
if ($running.Count -ge 4) { | |
$running | Wait-Job -Any | Out-Null | |
} | |
Write-Host "Starting job for $server" | |
Start-Job { |
This file contains hidden or 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
<# | |
PowerShell Utility to Calculate CheckSum of any file | |
#> | |
#Generated Form Function | |
function GenerateForm { | |
#region Import the Assemblies | |
[reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null | |
[reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null |
This file contains hidden or 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
<# | |
Loading an HKCU Hive to a target User | |
Script Usage: written for adding HKCU Keys while ruuning the script through system account | |
#> | |
cls | |
Function Get-ScriptDirectory | |
{ | |
$Invocation = (Get-Variable MyInvocation -Scope 1).Value |
This file contains hidden or 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
cls | |
#First Thing First: Lets come to Script Directory | |
Function Get-ScriptDirectory | |
{ | |
$Invocation = (Get-Variable MyInvocation -Scope 1).Value | |
Split-Path $Invocation.MyCommand.Path | |
} | |
cd (Get-ScriptDirectory) |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-16"?> | |
<StorableColorTheme xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<Keys> | |
<string>ErrorForegroundColor</string> | |
<string>ErrorBackgroundColor</string> | |
<string>WarningForegroundColor</string> | |
<string>WarningBackgroundColor</string> | |
<string>VerboseForegroundColor</string> | |
<string>VerboseBackgroundColor</string> | |
<string>DebugForegroundColor</string> |