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
Powershell.exe -ExecutionPolicy RemoteSigned -inputformat none -file "C:\Temp\Do-Stuff.ps1" |
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
Powershell.exe -ExecutionPolicy RemoteSigned -inputformat none -file "C:\Temp\Do-StuffWithArgs.ps1" %1 %2 |
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
# -------- config-parameters ------------ | |
# db config | |
$userid = "{uid}" | |
$password = "{pwd}" | |
$connstring = "Data Source={server};Initial Catalog={db};User Id={0};Password={1}" -f $userid,$password | |
# output file config | |
$outpath = "{output folder}" | |
$filprefix = "{prefix for saved file}" |
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
# 1st argument = xml file path | |
$xml = $args[0] | |
# 2nd argument = xsl file path | |
$xsl = $args[1] | |
#-------- | |
$destinationfolder = [System.IO.Path]::GetDirectoryName($xml) |
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
Function ExecuteSql(ByVal sql As String, ByVal connectionString As String) As ADODB.Recordset | |
'Executes sql statement and returns a disconnected recordset | |
Dim oConn As ADODB.Connection | |
Dim oRS As ADODB.Recordset | |
Set oConn = New ADODB.Connection | |
Set oRS = New ADODB.Recordset | |
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
Function TheLastColumn(sh As Worksheet) | |
On Error Resume Next | |
TheLastColumn = sh.Cells.Find(What:="*", _ | |
After:=sh.Range("A1"), _ | |
LookAt:=xlPart, _ | |
LookIn:=xlFormulas, _ | |
SearchOrder:=xlByColumns, _ | |
SearchDirection:=xlPrevious, _ | |
MatchCase:=False).Column |
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
REM http://superuser.com/questions/57016/menu-select-item-stuck-on-screen-after-context-or-command-menu-has-closed | |
tskill dwm |
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
$PSVersionTable.PSVersion |
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
cls | |
rem cleared the cmd window | |
@Echo Current dir: "%CD%" | |
@Echo Launch dir: "%~dp0" | |
rem jump to launchdir | |
pushd "%~dp0" | |
@Echo new current dir: "%CD%" |