Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XD7WaitForSite TEST and SET functions fail when used with psdscrunascredential #13

Closed
matt6697 opened this issue Mar 21, 2018 · 1 comment

Comments

@matt6697
Copy link
Contributor

The following code block make the TEST and SET functions of the XD7WaitForSite DSC resource fail when the resource is called using pssdcrunascredential instead of the credential parameter.

When $Crededential parameter is missing, the TestXDSite function throws an error.

$xdSiteName = TestXDSite -ExistingControllerName $ExistingControllerName -Credential $Credential;

The $Credential parameter is a mandatory parameter of the TestXDSite function (ValidateNotNull)

function TestXDSite {
<#
    .SYNOPSIS
        Checks whether the Citrix XenDesktop 7.x is available
#>
    [CmdletBinding()]
    [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingEmptyCatchBlock', '')]
    param (
        [Parameter(Mandatory)]
        [ValidateNotNullOrEmpty()]
        [System.String] $ExistingControllerName,

        [Parameter()]
        [ValidateNotNull()]
        [System.Management.Automation.PSCredential]
        [System.Management.Automation.CredentialAttribute()]
       $Credential
@matt6697
Copy link
Contributor Author

@iainbrighton : Additional PR #14 needed to make it work with psdscrunascredential. Could you review and merge ? Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant