Skip to content
This repository was archived by the owner on May 30, 2019. It is now read-only.
This repository was archived by the owner on May 30, 2019. It is now read-only.

Various Module Issues #30

@AGirin

Description

@AGirin

Thanks a lot for a great project! I found some issues with it though:

--> I was getting no such method Dispose() on Windows 2008 with PowerShell 2.0 installed here:

function PSUsing
{
param (
[System.IDisposable] $inputObject = $(throw "The parameter -inputObject is required."),
[ScriptBlock] $scriptBlock = $(throw "The parameter -scriptBlock is required.")
)
Try
{
&$scriptBlock
}
Finally
{
if ($inputObject -ne $null)
{
if ($inputObject.psbase -eq $null)
{
$inputObject.Dispose()
}
else
{
$inputObject.psbase.Dispose() <-------- No such method psbase.Dispose() in PowerShell 2.0
}
}
}
}

I had to comment that line out to make module work.

--> Module was erroring on that line with PowerShell 2.0:

RootModule = 'Graphite-Powershell.psm1'

I had to replace it with:

ModuleToProcess = 'Graphite-Powershell.psm1'

All these issues go away if I upgrade to PowerShell 3.0 though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions