I have been on GitHub for a while, but lately I have started to move everything I do to GitHub, for various reasons. One is that is easier for you to get the files directly, another is that I get source control. But there are many more reasons for this. There are many different repositories, the two main repositories are Functions and The Bunny Files and when I do demo script they will usually end up in the Demo Script folder.
- https://github.com/DeploymentBunny/Files/tree/master/Tools
- https://github.com/DeploymentBunny/Functions
- https://github.com/DeploymentBunny/DemoScript
Can I “Steal” your script?
Yes, you can, but it would be nice to get cred for the work, so include the link to the blog or to the GitHub repository. However, I don’t like to see my scripts ending up in PowerShell Gallery or the TechNet Gallery without asking me first…
How can I use the scripts directly from my scripts?
That is easy, you do something like this:
Invoke-WebRequest "https://raw.githubusercontent.com/DeploymentBunny/Files/master/Tools/Enable-NestedHyperV/EnableNestedHyperV.ps1" -OutFile ~/EnableNestedHyperV.ps1 Import-Module ~/EnableNestedHyperV.ps1 Enable-NestedHyperV -VMname TEST100
How will this affect the future?
This basically means that everything I do will end up at GitHub first and later most of this will then have a related blogpost, but not all, and not the same day.
/mike
Categories: GitHub, PowerShell
Welcome aboard DepBunny – what took you so long?!
GitHub is fantsatic – and way better than any solutions MS has proposed in this area – espeically as we tend to work more and more with Linux too…
Interesting thing, MS has a huge amount of code on GitHub, almost every team that works with scripts use GitHub as the foundation and sometimes it also ends up in the PowerShell Gallery. I know, should have been here years ago, sorry
btw – the correct English spelling is “steal” – “steel” is a type of metal ;)
Great articles!
Woops :-)
Hello, Mike!
GitGub it is fine, but it’s Linux: end of line strings in source files come to the end with ‘\r’.
Your downloaded scripts look ugly in Windows (notepad.exe, for example).
There is a solution: add ‘autocrlf = false’ to ‘.git\config’ at your Git client configuration and re-publish scripts.
Thanks for your scripts! :-)