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
use master | |
GO | |
CREATE LOGIN [app1] WITH PASSWORD = 0x0100782FBD65E30E772B02685C41E3F69FC1E639EC77F5F4061A HASHED, SID = 0x63F51E14DBA20942AF361A3300193A7B, DEFAULT_DATABASE = [master], CHECK_POLICY = ON, CHECK_EXPIRATION = OFF, DEFAULT_LANGUAGE = [us_english] | |
GO | |
use master | |
GO | |
Grant CONNECT SQL TO [app1] AS [sa] | |
GO | |
use master | |
GO |
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
********************** | |
Windows PowerShell transcript start | |
Start time: 20160706002352 | |
Username: BASE\ctrlb | |
RunAs User: BASE\ctrlb | |
Machine: SHAREPOINT2016 (Microsoft Windows NT 10.0.14300.0) | |
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe | |
Process ID: 10832 | |
PSVersion: 5.1.14300.1000 |
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
repeat | |
try | |
do shell script "ping -o -t 2 10.0.0.1" | |
on error | |
say "Couldn't connect" | |
do shell script "networksetup -setairportpower en1 off" | |
do shell script "sleep 1" | |
do shell script "networksetup -setairportpower en1 on" | |
end try | |
delay 5 |
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
<# | |
.SYNOPSIS | |
Displays list of accounts that have been locked out in AD since the last time each DC's Event Log has rolled over. | |
.DESCRIPTION | |
By default, this script displays list of accounts that have been locked out on the current domain since the last time the Event Log rolled over. Results can be filtered by using parameters. | |
.PARAMETER forest | |
Queries all DCs in the current forest |
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 ($PSScriptRoot) { $location = $PSScriptRoot } else { $location = (Get-Location).Path } | |
$dll = "$location\System.Data.SqlServerCe.dll" | |
# look into SQLiteDataAdapter | |
if ($GetDll) { | |
$wc = New-Object System.Net.WebClient | |
$url = "https://netnerds.net/System.Data.SqlServerCe.dll" | |
$wc.DownloadFile($url,$dll) | |
} |
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
<# | |
In this example: | |
1. Active Directory domain: base.local | |
2. Service acct: base\ubuntuauth | |
3. Service acct pass: SkiAlta2009 | |
4. Win 10 workstation name: nimy.base.local | |
5. Secondary DNS name: localweb.base.local | |
6. Firewall allows port 80 | |
Kerberos doesn't allow you to do http://localhost if you want |
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
<# | |
In this example: | |
1. Active Directory domain: base.local | |
2. Domain controller 1: dc.base.local | |
3. Domain controller 2: bdc.base.local | |
4. Test username: base\chrissy | |
5. Test Ubuntu FQDN: web1.base.local | |
Note: Make sure your DNS servers are your AD DNS servers | |
#> |
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
<# | |
In this example: | |
1. Active Directory domain: base.local | |
2. Domain controller 1: dc.base.local | |
3. Domain controller 2: bdc.base.local | |
4. Test username: base\chrissy | |
Note: Make sure your DNS servers are your AD DNS servers | |
#> |
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
# Edit /etc/apt/apt.conf.d/95proxies | |
Acquire::http::proxy "http://proxy.ad.local:8080/"; | |
Acquire::ftp::proxy "ftp://proxy.ad.local:8080/"; | |
Acquire::https::proxy "https://proxy.ad.local:8080/"; | |
# Edit /etc/environment | |
http_proxy="http://proxy.ad.local:8080/" | |
https_proxy="http://proxy.ad.local:8080/" |
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
apt-get -y install ntp ntpdate | |
service ntp stop | |
ntpdate -s 10.0.1.10 | |
service ntp start | |
apt-get -y install krb5-user | |
echo HTTP/ubuntunew.base.local@BASE.LOCAL > /etc/httpd.keytab |