Graphite-PowerShell-Functions icon indicating copy to clipboard operation
Graphite-PowerShell-Functions copied to clipboard

PowerShell Versions

Open ikkaro opened this issue 11 years ago • 5 comments

Hi Matt,

It seems that the module doesn't works fine in Powershell v2.0 because of the method IsNullOrWhitespace and others, could that to be fixed or add a copy of the functions for PowerShell 2.0.

http://blog.danskingdom.com/powershell-2-0-vs-3-0-syntax-differences-and-more/

ikkaro avatar Nov 28 '14 16:11 ikkaro

Also confirming this - runs fine under 3.0, but not 2.0. Not a biggie, gives us a reason to upgrade to 3.0.

christrotter avatar Dec 03 '14 02:12 christrotter

In fact, it needs PowerShell v3. Maybe adding the information in the README could be useful, or just a check in the code.

Something like

if ($host.version.major -lt 3) {
   write-host You need at least version 3 of Powershell.
   Exit
}

I could add it to the code, but I don't know where to put it for a module.

daks avatar Dec 23 '14 14:12 daks

Hi @MattHodge , @ikkaro , @daks , there is any tested workarround which enable us run this tool ok in Powershell v2 ?

toni-moreno avatar Oct 22 '15 14:10 toni-moreno

I am pretty sure someone made a fork which supported v2. Cannot find it though :/

MattHodge avatar Oct 22 '15 15:10 MattHodge

The fork that supports v2 is located here: https://github.com/ashishpandey/Graphite-PowerShell-Functions

gsmaul avatar Nov 05 '15 21:11 gsmaul