Skip to content

SessionHostConfiguration.ps1 failing with "Parameter not found" #763

@lpmulligan-ew

Description

@lpmulligan-ew

What happened? Provide a clear and concise description of the bug, including deployment details.

A new deployment fails with the error "A parameter cannot be found that matches parameter name 'FslogixStorageFqdn'."

It looks like the SessionHostConfiguration.ps1 script was changed recently with "Q1 2025 - Updates #758". The current version of the script with commit ID f8611e1 lacks the FslogixStorageFqdn input parameter but the previous version e5f50c5 has it.

[parameter(Mandatory=$false)]
[string]
$FslogixFileShare,

[parameter(Mandatory=$false)]
[string]
$fslogixStorageFqdn,

[parameter(Mandatory)]
[string]
$HostPoolRegistrationToken,

Editing line 44 in the deployment file workload/bicep/modules/avdSessionHosts/.bicep/configureSessionHost.bicep from

var varScriptArguments = fslogix ? '-IdentityDomainName ${identityDomainName} -AmdVmSize ${varAmdVmSize} -IdentityServiceProvider ${identityServiceProvider} -Fslogix ${fslogix} -FslogixFileShare ${fslogixFileShare} -FslogixStorageFqdn ${fslogixStorageFqdn} -HostPoolRegistrationToken ${hostPoolToken} -NvidiaVmSize ${varNvidiaVmSize} -verbose' : '-AmdVmSize ${varAmdVmSize} -IdentityServiceProvider ${identityServiceProvider} -Fslogix ${fslogix} -HostPoolRegistrationToken ${hostPoolToken} -NvidiaVmSize ${varNvidiaVmSize} -verbose'

to this (removing -FslogixStorageFqdn ${fslogixStorageFqdn}

var varScriptArguments = fslogix ? '-IdentityDomainName ${identityDomainName} -AmdVmSize ${varAmdVmSize} -IdentityServiceProvider ${identityServiceProvider} -Fslogix ${fslogix} -FslogixFileShare ${fslogixFileShare} -HostPoolRegistrationToken ${hostPoolToken} -NvidiaVmSize ${varNvidiaVmSize} -verbose' : '-AmdVmSize ${varAmdVmSize} -IdentityServiceProvider ${identityServiceProvider} -Fslogix ${fslogix} -HostPoolRegistrationToken ${hostPoolToken} -NvidiaVmSize ${varNvidiaVmSize} -verbose'

results in a successful deployment.

It seems like now SessionHostConfiguration calculates the FQDN with this line

$FSLogixStorageFQDN = $FSLogixFileShare.Split('\')[2]

so it appears removing the input parameter from the deployment file is correct.

Please provide the correlation id associated with your error or bug.

84723b1b-fb2f-4119-bbd2-5645de337db2

What was the expected outcome?

A successful deployment of the Session Hosts.

Relevant log output

"code":"VMExtensionProvisioningError","message":"VM has reported a user failure when processing extension 'SessionHostConfig'. Please correct the error and try again. (publisher 'Microsoft.Compute' and type 'CustomScriptExtension'). Error code: '2'. Error message: 'Command execution finished, but failed because it returned a non-zero exit code of: '1'. The command had an error output of: 'C:\\Packages\\Plugins\\Microsoft.Compute.CustomScriptExtension\\1.10.20\\Downloads\\0\\Set-SessionHostConfiguration.ps1 : A \r\nparameter cannot be found that matches parameter name 'FslogixStorageFqdn'.\r\n    + CategoryInfo          : InvalidArgument: (:) [Set-Sess...' For more information, check the instance view by executing Get-AzVmssVm or Get-AzVm (https://aka.ms/GetAzVm). These commands can be executed using CloudShell (https://aka.ms/CloudShell)'. Detailed error: ''. More information on troubleshooting is available at https://aka.ms/VMExtensionCSEWindowsTroubleshoot."}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions