So you can probably guess that importing a module is just loading someone else's code. A module, when professionally written is most likely "compiled" code. Code written C# or another .NET language and compiled into a DLL. In Visual Studio you can create PowerShell projects. Does that mean, if you want you own module, you need to start learning Visual Studio and C# ? Hell no, you can create your own module in matter of minutes with nothing more that just plain old PowerShell.
Thursday, December 15, 2016
Create your own PowerShell Modules
So you can probably guess that importing a module is just loading someone else's code. A module, when professionally written is most likely "compiled" code. Code written C# or another .NET language and compiled into a DLL. In Visual Studio you can create PowerShell projects. Does that mean, if you want you own module, you need to start learning Visual Studio and C# ? Hell no, you can create your own module in matter of minutes with nothing more that just plain old PowerShell.
Labels:
manifest
,
module
,
powershell
,
tutorial
Friday, December 9, 2016
Powershell Logging - The professional way
I've seen many PowerShell scripts in my career. Fantastic ones and awful ones. But I have very very rarely seen scripts where proper logging has been done. Everyone seems to know write-output. The clever ones know write-verbose and write-warning. Some are really smart and write their own logging functions, allowing some level of customization.
But...
If you really want to show off with your logging, you need the full monty. You want screen logging, rolling log files with automated time-stamps and you want event viewer logging. Obviously, you want to have control of what and when.
But...
If you really want to show off with your logging, you need the full monty. You want screen logging, rolling log files with automated time-stamps and you want event viewer logging. Obviously, you want to have control of what and when.
Thursday, December 8, 2016
Invoke workflow with Perl and REST
Ever heard of REST ? In a nutshell : REST is a way of talking to a remote 'system' using existing standards. http(s) as the protocol and json or xml as the carrier. Reading is a GET, Writing is a POST.
Oh, and did you know WFA has a REST api ? That's right, you can talk to WFA with about any programming language there is.
I'm a powershell / .NET guy, so I'll post a powershell sample ASAP. But I just saw this nice piece of PERL code from my colleague Todd and couldn't wait sharing. I guess Todd won't mind :), and hopefully he'll add some more comment to this article.
Oh, and did you know WFA has a REST api ? That's right, you can talk to WFA with about any programming language there is.
I'm a powershell / .NET guy, so I'll post a powershell sample ASAP. But I just saw this nice piece of PERL code from my colleague Todd and couldn't wait sharing. I guess Todd won't mind :), and hopefully he'll add some more comment to this article.
Incremental Naming

It ended up in a debate where both have a point. So how does incremental naming work ?
Labels:
incremental naming
,
mysql
,
reservation
,
sql
,
verification
,
wfa
Monday, December 5, 2016
Tutorial : Move all volumes from one aggregate to another

Labels:
command
,
datasource
,
powershell
,
reservation
,
sql
,
tutorial
,
verification
,
wfa
,
youtube
WFA and reservations, what is it and how does it work ?
If you know a little about WFA, you probably know that WFA gets all his information from external sources. Most of the time, it gets its information from OnCommand Unified Manager (OCUM). Now OCUM, re-scans its information every 15 minutes. After that re-scan, you still need to wait for the WFA re-scan to happen. Agreed, you can configure OCUM to update the WFA cache database right after its own refresh (reducing the LAG-time), but you will always have a potential 15 minutes LAG. So how can WFA work around that problem ? That's what you will learn in this article.
Labels:
command
,
mysql
,
reservation
,
verification
,
wfa
Friday, December 2, 2016
WFA Command to install a Root CA Certificate on a SVM
For a customer I had to create SVM's and join them in AD. However, the Active Directory Server was using a public certificate. Thus, to be able to join the SVM in AD, we first had to install the Root CA certificate on the SVM. A troublesome manouvre if you have to it manually with the CLI. Since were provisioning with WFA, why not just create a command to do this. The customer also has lots of site and DC's, so we added the functionality to set the preferred DC as well.
Below is the code, but I've also added the DAR file.
Below is the code, but I've also added the DAR file.
Labels:
certificate
,
command
,
powershell
,
wfa
Subscribe to:
Posts
(
Atom
)