Skip to content

DisplayForm won't work #4

Description

@LaurensBracke

When I try to run PrepareWVDImage.ps1 with argument -DisplayForm, I get the following errors and the screen of the form stays blank:

image

PS C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage> .\Prepare-WVDImage.ps1 -DisplayForm
The property 'text' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1266 char:5

  • $InstallOffice365.text = "Install Office 365 ProPlus"
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'AutoSize' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1267 char:5

  • $InstallOffice365.AutoSize = $false
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'width' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1268 char:5

  • $InstallOffice365.width = 300
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'height' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1269 char:5

  • $InstallOffice365.height = 30
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'location' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1270 char:5

  • $InstallOffice365.location = New-Object System.Drawing.Point(30,  ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'Font' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1271 char:5

  • $InstallOffice365.Font = 'Microsoft Sans Serif,14'
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

Method invocation failed because [System.Boolean] does not contain a method named 'Add_CheckStateChanged'.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1273 char:5

  • $InstallOffice365.Add_CheckStateChanged( {
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

The property 'text' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1328 char:5

  • $InstallFSLogix.text = "Install FSLogix Agent"
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'AutoSize' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1329 char:5

  • $InstallFSLogix.AutoSize = $false
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'width' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1330 char:5

  • $InstallFSLogix.width = 250
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'height' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1331 char:5

  • $InstallFSLogix.height = 30
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'location' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1332 char:5

  • $InstallFSLogix.location = New-Object System.Drawing.Point(30, 24 ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'Font' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1333 char:5

  • $InstallFSLogix.Font = 'Microsoft Sans Serif,14'
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

Method invocation failed because [System.Boolean] does not contain a method named 'Add_CheckStateChanged'.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1335 char:5

  • $InstallFSLogix.Add_CheckStateChanged( {
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

The property 'text' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1357 char:5

  • $InstallOneDrive.text = "Install OneDrive per Machine "
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'AutoSize' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1358 char:5

  • $InstallOneDrive.AutoSize = $false
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'width' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1359 char:5

  • $InstallOneDrive.width = 400
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'height' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1360 char:5

  • $InstallOneDrive.height = 30
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'location' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1361 char:5

  • $InstallOneDrive.location = New-Object System.Drawing.Point(30, 3 ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'Font' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1362 char:5

  • $InstallOneDrive.Font = 'Microsoft Sans Serif,14'
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

Method invocation failed because [System.Boolean] does not contain a method named 'Add_CheckStateChanged'.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1364 char:5

  • $InstallOneDrive.Add_CheckStateChanged( {
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : MethodNotFound

The property 'text' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1386 char:5

  • $InstallTeams.text = "Install Microsoft Teams per Machine"
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'AutoSize' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1387 char:5

  • $InstallTeams.AutoSize = $false
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'width' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1388 char:5

  • $InstallTeams.width = 400
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'height' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1389 char:5

  • $InstallTeams.height = 30
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'location' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1390 char:5

  • $InstallTeams.location = New-Object System.Drawing.Point(30, 360)
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'Font' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1391 char:5

  • $InstallTeams.Font = 'Microsoft Sans Serif,14'
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'text' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1394 char:5

  • $InstallEdge.text = "Install Microsoft Edge Enterprise"
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'AutoSize' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1395 char:5

  • $InstallEdge.AutoSize = $false
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'width' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1396 char:5

  • $InstallEdge.width = 400
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'height' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1397 char:5

  • $InstallEdge.height = 30
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'location' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1398 char:5

  • $InstallEdge.location = New-Object System.Drawing.Point(30, 390)
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

The property 'Font' cannot be found on this object. Verify that the property exists and can be set.
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1399 char:5

  • $InstallEdge.Font = 'Microsoft Sans Serif,14'
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [], RuntimeException
    • FullyQualifiedErrorId : PropertyAssignmentException

Cannot convert argument "controls", with value: "System.Object[]", for "AddRange" to type "System.Windows.Forms.Control
[]": "Cannot convert value "True" to type "System.Windows.Forms.Control". Error: "Invalid cast from 'System.Boolean' to
'System.Windows.Forms.Control'.""
At C:\Users\lbke\Downloads\Customizations\Prepare-WVDImage\Prepare-WVDImage.ps1:1437 char:5

  • $WVDGoldenImagePrep.controls.AddRange(@($Execute, $ScriptTitle, $ ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodException
    • FullyQualifiedErrorId : MethodArgumentConversionInvalidCastArgument

Can you investigate what is going wrong?
Thx

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions