The Internet’s Underworld
December 30th, 2008 | Blog | No Comments »
The UK Guardian newspaper has a great diagram of ‘the internet’s undersea world‘ online.
December 30th, 2008 | Blog | No Comments »
The UK Guardian newspaper has a great diagram of ‘the internet’s undersea world‘ online.
December 22nd, 2008 | Blog | No Comments »
A quick script to connect to an sql sserver and get the information from a table. In this case find the SQL Proxy accounts from the msdb database.
# SQL Server and Database Information
$SqlServer = “.”;
$SqlCatalog = “msdb”;# SQL Query Statement
$q= “EXEC dbo.sp_help_proxy”
$cn = new-object system.data.SqlClient.SqlConnection(“Data Source=$SqlServer;Integrated Security=SSPI;Initial Catalog=$SqlCatalog”);
$ds = new-object “System.Data.DataSet” “dbo”$da = new-object “System.Data.SqlClient.SqlDataAdapter” ($q, $cn)
$junk = $da.Fill($ds)
$proxyAccounts = new-object “System.Data.DataTable” “dtPersonData”
$proxyAccounts = $ds.Tables[0]$proxyAccounts | FOREACH-OBJECT {“” + $_.Name}
December 22nd, 2008 | Blog | No Comments »
A quick script to compare two arrays.
$arrFirst = get-content First.txt
$arrSecond = get-content Second.txtNew-Item “C:MyworkplacepsFirstInSecond.txt” -Type file
New-Item “C:MyworkplacepsFirstNotInSecond” -Type fileForeach ($First in $arrFirst)
{
If ($arrSecond -contains $First)
{Add-content “C:MyworkplacepsFirstInsecond.txt” $First}
Else
{Add-content “C:MyworkplacepsFirstNotInSecond.txt” $First}