Skip to content

Instantly share code, notes, and snippets.

#region Functions
function Invoke-SQL {
param (
[string] $dataSource = ".\SQLEXPRESS",
[string] $database = "MasterData",
[string] $sqlCommand = $(throw "Please specify a query")
)
$connectionString = "Data Source=$dataSource;Integrated Security=SSPI;Initial Catalog=$database";
$connection = new-object System.Data.SqlClient.SqlConnection($connectionString);
##############################################
############## Script Info ###################
##############################################
## Created By : Dan Cook 2017 ########
##############################################
<#
Version Info :
0.1 - 25/05/2017 - Creates a graphvis diagram and accompanying DOT code file
for an SCCM application dependency tree, by querying the

Just some notes and references for myself.

  • In bash, you can access your C:\ drive via /mnt/c/
  • ~ = C:\Users\MLM\AppData\Local\lxss\home\mlm and is different from your Windows user directory C:\Users\MLM

How to google things