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 | |
# Bohack | |
# 04/26/16 | |
# Script to generate password for htpasswd file | |
if [ -z "$1" ] | |
then | |
echo | |
echo "$0 [user to generate passwd for]" |
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
' Author: Jon Buhagiar | |
' Date: 10/19/17 | |
' Purpose: This script will check the ViewClient_Broker_Tags. If it is External | |
' or 10.8x.0.0 (wireless) then it will quit and allow TPAutoConnect to | |
' redirect the client host default printer. If it is not External or 10.8x | |
' it is assumed to be Internal, the script will then record the current | |
' default printer and set the default printer via the regKey. Edit the | |
' strIPExclude with a CSV value. | |
' | |
' Usage: Use a GPO applied to the VDI computers for logon and logoff scripts for |
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
@ECHO OFF | |
REM Bohack | |
REM 2/23/18 | |
REM Get a list of users by their SAMid and lookup their UPN | |
FOR /F "TOKENS=*" %%a IN (listofusers.txt) DO ( | |
ECHO %%a | |
DSQUERY USER -SAMID %%a | DSGET USER -SAMID -UPN | |
) |
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
On Error Resume Next | |
Prefix ="fstu516" | |
For Count = 1 to 36 | |
Total = 0 | |
If Count < 10 then Fill="00" | |
If Count < 100 and Count > 9 then Fill="0" | |
strComputer = Prefix & Fill & Count | |
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") | |
Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory") |
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
<# | |
.Synopsis | |
Verify Local SAM store | |
.DESCRIPTION | |
This function takes a user name and a password as input and will verify if the combination is correct. The function returns a boolean based on the result. The script defaults to local user accounts, but a remote computername can be specified in the -ComputerName parameter. | |
.NOTES | |
Name: Test-LocalCredential | |
Author: Jaap Brasser |
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
# Create users and Groups for Lab | |
# Bohack | |
# 11/6/17 | |
Import-Module ActiveDirectory | |
# Variables for Creation | |
$rtdomain = "DC=Netmind,DC=Local" | |
$orgrt = "Netmind" | |
$orgpath = "OU=Netmind,$rtdomain" |
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
# Create users and Groups for Lab | |
# Bohack | |
# 08/31/14 | |
Import-Module ActiveDirectory | |
# Create the OU structure | |
Echo "Creating OU Structure" | |
New-ADOrganizationalUnit -Name Contoso -Path "DC=Contoso,DC=Com" |
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
Import-Module ActiveDirectory | |
function Get-ADUserLastLogon([string]$userName) | |
{ | |
$dcs = Get-ADDomainController -Filter {Name -like "*"} | |
$time = 0 | |
foreach($dc in $dcs) | |
{ | |
$hostname = $dc.HostName | |
$user = Get-ADUser $userName | Get-ADObject -Properties lastLogon |
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
@ECHO OFF | |
REM Jon Buhagiar | |
REM 10/19/17 | |
REM Office Manual Activation | |
IF EXIST "C:\Support\.officeactivation" GOTO :END | |
CSCRIPT "C:\Program Files (x86)\Microsoft Office\Office16\ospp.vbs" /act | |
ECHO %ERRORLEVEL% - %DATE% - %TIME% > "C:\Support\.officeactivation" |
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
Scale out as needed! | |
3 Tablespoon Paprika | |
1 Tablespoon Pepper | |
1/2 to 1 Teaspoon of non-iodized Salt | |
1/2 to 1 Teaspoon of Cayenne Pepper (be careful!) | |
1 Tablespoon of Powered Onion | |
1 Tablespoon of Powered Garlic | |
2 Tablespoons of Brown Sugar | |
1 Tablespoon of Chilli powder |