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

DisplayForm won't work #4

Closed
LaurensBracke opened this issue Oct 20, 2021 · 6 comments · May be fixed by #2
Closed

DisplayForm won't work #4

LaurensBracke opened this issue Oct 20, 2021 · 6 comments · May be fixed by #2
Assignees

Comments

@LaurensBracke
Copy link

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

@Nmaior
Copy link

Nmaior commented Oct 27, 2021

Hi!
Having the same issue, did you found a solution?
Thanks!

@DawnWertz
Copy link

I am having the same issues

@killerisme187
Copy link

Having the same issue.

@mr-childers
Copy link

Issue confirmed in both Powershell 5.1 and 7

@shawntmeyer shawntmeyer self-assigned this Nov 3, 2021
@shawntmeyer shawntmeyer linked a pull request Nov 3, 2021 that will close this issue
@shawntmeyer
Copy link
Owner

I made a mistake with my pull request a few weeks ago. The issue should be fixed.

@shawntmeyer
Copy link
Owner

fixed via revert

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

Successfully merging a pull request may close this issue.

6 participants