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
#!/bin/bash | |
declare -a worlds=(firstworld Netherworld thirdworld) | |
numworlds=${#worlds[@]} | |
if [ "$(ps aux|egrep -v 'grep|pigmap.sh'|egrep 'python|rsync|pigmap')" ] | |
then | |
echo Running process found exiting | |
exit 0 | |
else |
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 | |
exec sp_adddistributiondb | |
@database = N'Distrib-PLZ74', | |
@data_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data', | |
@log_folder = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\Data', | |
@data_file_size = 5, | |
@log_file_size = 5, | |
@min_distretention = 0, | |
@max_distretention = 24, |
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 [Distrib-PLZ74] | |
GO | |
IF NOT EXISTS (SELECT * FROM sysobjects WHERE name = 'UIProperties' AND type = 'U ') | |
CREATE TABLE UIProperties(id INT) | |
IF EXISTS (SELECT * FROM ::fn_listextendedproperty('SnapshotFolder', 'user','dbo', 'table', 'UIProperties', null, null)) | |
EXEC sp_updateextendedproperty | |
N'SnapshotFolder', | |
N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\ReplData', | |
'user', |
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
exec sp_adddistpublisher | |
@publisher = N'DEVELOPMENT', | |
@distribution_db = N'Distrib-PLZ74', | |
@security_mode = 1, -- Trusted Security | |
@working_directory = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\ReplData', | |
@trusted = N'false', -- deprecated | |
@thirdparty_flag = 0, -- SQL Server | |
@publisher_type = N'MSSQLSERVER' |
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
$nwcon = [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")).getNetworkConnections() | |
$res = $nwcon | % { | |
$_.GetNetwork().SetCategory(1) | |
} | |
# More unreadable (but tested form) | |
# [Activator]::CreateInstance([Type]::GetTypeFromCLSID([Guid]"{DCB00C01-570F-4A9B-8D69-199FDBA5723B}")).getNetworkConnections() | % {$_.GetNetwork().SetCategory(1)} |
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 Wscript.Arguments.Count = 0 Then | |
WScript.Echo "Syntax: HideWindowsUpdateById.vbs [Update ID]" & vbCRLF & _ | |
"Examples:" & vbCRLF & _ | |
" - Hide KB940157: HideWindowsUpdateById.vbs 2ba85467-deaf-44a1-a035-697742efab0f" | |
WScript.Quit 1 | |
End If | |
Dim updateId | |
updateId = WScript.Arguments(0) |
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
@echo off | |
set OLDDIR=%CD% | |
set PASS_PATH=c:\temp\ | |
set PASS_BIN=%PASS_PATH%\pass.ps1 | |
cd %PASS_PATH% | |
Powershell.exe -executionPolicy unrestricted -File %PASS_BIN% %* | |
chdir /d %OLDDIR% &rem restore current directory |
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
configuration ConfigureDSCClient | |
{ | |
param ($NodeId, $PullServer) | |
LocalConfigurationManager | |
{ | |
AllowModuleOverwrite = 'True' | |
ConfigurationID = $NodeId | |
ConfigurationModeFrequencyMins = 60 | |
ConfigurationMode = 'ApplyAndAutoCorrect' |