Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to convert powershell script to c# code

$MigrateUserButton.Add_Click({
#$SkypeEVButton.Font = [System.Drawing.Font]::new("Cambria", 12, [System.Drawing.FontStyle]::Bold)
$RollBackUserButton.Font = [System.Drawing.Font]::new("Cambria", 10, [System.Drawing.FontStyle]::Regular)
$MigrateUserButton.Font = [System.Drawing.Font]::new("Cambria", 10, [System.Drawing.FontStyle]::Bold)
#$EnablerecordingButton.Font = [System.Drawing.Font]::new("Cambria", 10, [System.Drawing.FontStyle]::Regular)
       
       $Tabpage3.Controls.Remove($RollBackUserTitle)
       $Tabpage3.Controls.Remove($RollBackUserLabel)
       $Tabpage3.Controls.Remove($RollBackUserTextbox)
       $Tabpage3.Controls.Remove($RollBackUserSubmitButton)
        $AddCommentLabelm4.Text = ""

       
                 
        $MigrateUserTitle.Text = "Migrate users to Teams Only"
        $MigrateUserTitle.Location = '180,260'
        $MigrateUserTitle.Size = '1000,23'
        $MigrateUserTitle.AutoSize = $true
        $MigrateUserTitle.Font = [System.Drawing.Font]::new("Cambria",13) #, [System.Drawing.FontStyle]::Bold)
        $Tabpage3.controls.add($MigrateUserTitle)

        
        $MigrateUserLabel.Text = "Enter user EID:"
        $MigrateUserLabel.Location = '23,310'
        $MigrateUserLabel.Size = '300,23'
        $MigrateUserLabel.Font = [System.Drawing.Font]::new("Cambria",10)
        $Tabpage3.controls.add($MigrateUserLabel)


        $MigrateUserTextbox.Location = '23,360'
        $MigrateUserTextbox.Size = '250,100'
        $MigrateUserTextbox.Font = [System.Drawing.Font]::new("Cambria",15)#, [System.Drawing.FontStyle]::Bold)
        $MigrateUserTextbox.Multiline = $true
        $Tabpage3.controls.add($MigrateUserTextbox)

        
        $MigrateUserSubmitButton.Location = New-Object System.Drawing.Size(23,510)
        $MigrateUserSubmitButton.Size = New-Object System.Drawing.Size(100,35)
        $MigrateUserSubmitButton.AutoSize = $true
        $MigrateUserSubmitButton.Font = $font
        $MigrateUserSubmitButton.Text = "Migrate to Teams"
        $Tabpage3.Controls.Add($MigrateUserSubmitButton)
        $AddCommentLabelm4.Text = ""
        })
        
Source by social.msdn.microsoft.com #
 
PREVIOUS NEXT
Tagged: #convert #powershell #script #code
ADD COMMENT
Topic
Name
9+8 =