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
Wednesday, November 30, 2016
Abstract provisioning using an Excel file

Tuesday, November 29, 2016
SQL Select Queries with JOINS for dummies

Tutorial : Resize a volume, the proper way

Thursday, November 24, 2016
WFA Powershell Commands Slow ?
Are you running WFA and are all PowerShell commands slow ?
Maybe CRL checking is enabled...
PowerShell cmdlets are sometimes "signed" and when they are run, they tend to go the the web and check the CRL (Certificate Revocation List). Now if internet connection is not allowed or slow, this will impact the speed of the commands.Wednesday, November 23, 2016
Create you first WFA workflow

Tuesday, November 22, 2016
How to install WFA on windows

Never installed WFA before ? Here is a step-by-step tutorial.
Monday, November 21, 2016
Wfa string, char and numeric functions

Generating number sequence in MySQL
Sometimes you need to create a dropdown box with a list sequential numbers. Now that can be just plain 1,2,3. But it could just as well be 400,500,600, ...
Use-cases are for example, you want to provide a dropdown box to resize a volume, but you don't want the operator to go below the current size and you don't want him to over 10TB for example and you always want it to be a multiple of 100GB. How do you provide such a list ?
Use-cases are for example, you want to provide a dropdown box to resize a volume, but you don't want the operator to go below the current size and you don't want him to over 10TB for example and you always want it to be a multiple of 100GB. How do you provide such a list ?
Find a netapp lun by WWID
When you create userinput and you need to present some luns in a dropdownbox, most of the time, you just list up your luns.
However, sometimes you want to create a portal to non-netapp people. Linux people for example. And they have no clue of what the lun is named.
They do however have the WWID, a hexadecimal string. Part of that string is the actual netapp lun serial number. With some simple MySQL querying, it's very simple to determine the actual lun.
Sunday, November 20, 2016
Powershell Transpose Table Data
I had a question from a friend this weekend how he could transpose a powershell table. I couldn't find anything working on the web, so created my own.
Saturday, November 19, 2016
WFA Datasource Template
If you are working with WFA for quite some time, you will eventually need more advanced workflows, requiring a custom scheme and dictionaries. And most likely you will want to import external data and import that data into you custom dictionaries. To import that data, you will need to have a custom datasource.
Subscribe to:
Posts
(
Atom
)