Skip to content

Commit 05a8d2b

Browse files
Updated readme [skip ci]
1 parent 9d572c3 commit 05a8d2b

File tree

1 file changed

+5
-36
lines changed

1 file changed

+5
-36
lines changed

README.md

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
Various PowerShell functions and scripts. These are published as [WFTools](https://www.powershellgallery.com/packages/WFTools/0.1.39) on the PowerShell Gallery (thanks to @psrdrgz for the idea!)
44

5+
Two functions have been migrated to their own repositories to simplify and enable improved collaboration. Copies remain here for historical purposes and may be updated:
6+
7+
* [Invoke-Parallel](https://github.com/RamblingCookieMonster/Invoke-Parallel)
8+
* [Invoke-SqlCmd2](https://github.com/sqlcollaborative/Invoke-SqlCmd2)
9+
510
## Instructions
611

712
These files contain functions. For example, Invoke-Sqlcmd2.ps1 contains the Invoke-Sqlcmd2 function.
@@ -25,42 +30,6 @@ These files contain functions. For example, Invoke-Sqlcmd2.ps1 contains the Inv
2530

2631
Note: Using Import-Module to load these functions will break certain scenarios for Invoke-Parallel's variable import ([details](https://github.com/RamblingCookieMonster/Invoke-Parallel/issues/16#issuecomment-77167598)) - dot source the function if you need this.
2732

28-
## Invoke-Sqlcmd2
29-
30-
I'm a fan of Invoke-Sqlcmd2. Props to Chad Miller and the other contributors for a fantastic function. I've added a few features with much help from others:
31-
32-
* Added pipeline support, with the option to append a ServerInstance column to keep track of your results:
33-
* ![Add ServerInstance column](/Images/ISCAppendServerInstance.png)
34-
* Added the option to pass in a PSCredential instead of a plaintext password
35-
* ![Use PSCredential](/Images/ISCCreds.png)
36-
* Added PSObject output type to allow comparisons without odd [System.DBNull]::Value behavior:
37-
* Previously, many PowerShell comparisons resulted in errors:
38-
* ![GT Comparison Errors](/Images/ISCCompareGT.png)
39-
* With PSObject output, comparisons behave as expected:
40-
* ![GT Comparison Fix](/Images/ISCCompareGTFix.png)
41-
* Previously, testing for nonnull / null values did not work as expected:
42-
* ![NotNull Fails](/Images/ISCCompareNotNull.png)
43-
* With PSObject output, null values are excluded as expected
44-
* ![NotNull Fails Fix](/Images/ISCCompareNotNullFix.png)
45-
* Speed comparison between DataRow and PSObject output with 1854 rows, 84 columns:
46-
* ![Speed PSObject v Datarow](/Images/ISCPSObjectVsDatarow.png)
47-
48-
### That DBNull behavior is strange! Why doesn't it behave as expected?
49-
50-
I agree. PowerShell does a lot of work under the covers to provide behavior a non-developer might expect. From my perspective, PowerShell should handle [System.DBNull]::Value like it does Null. Please vote up [this Microsoft Connect suggestion](https://connect.microsoft.com/PowerShell/feedback/details/830412/provide-expected-comparison-handling-for-dbnull) if you agree!
51-
52-
Major thanks to [Dave Wyatt](http://powershell.org/wp/forums/topic/dealing-with-dbnull/) for providing the C# code that produces the PSObject output type as a workaround for this.
53-
54-
### You clearly don't know SQL. Why are you working on this function?
55-
56-
I absolutely do not know SQL. If I'm doing something wrong please let me know!
57-
58-
I have a number of projects at work that involve PowerShell wrappers for SQL queries. Invoke-Sqlcmd2 has been my go-to command for this - now that I'm spending more time with it, I plan to add some functionality.
59-
60-
### Why is Invoke-Sqlcmd2 here?
61-
62-
I copied the code here to avoid the automated tweets for Poshcode.org submissions. I make many small changes and didn't want to spam twitter : )
63-
6433
## TechNet Galleries Contributions
6534

6635
Many of these functions started out in the Technet Gallery. You might find more context at these links.

0 commit comments

Comments
 (0)