Change stuff
This commit is contained in:
parent
8509174d91
commit
ec111816d5
|
@ -34,8 +34,8 @@ $Mquestion = New-Object System.Windows.Forms.ToolStripMenuItem
|
||||||
$MQuestionApropos = New-Object System.Windows.Forms.ToolStripMenuItem
|
$MQuestionApropos = New-Object System.Windows.Forms.ToolStripMenuItem
|
||||||
$MQuestionWiki = New-Object System.Windows.Forms.ToolStripMenuItem
|
$MQuestionWiki = New-Object System.Windows.Forms.ToolStripMenuItem
|
||||||
$Bgo = New-Object System.Windows.Forms.Button
|
$Bgo = New-Object System.Windows.Forms.Button
|
||||||
$comboBox1 = New-Object System.Windows.Forms.ComboBox
|
$CBsourceSite = New-Object System.Windows.Forms.ComboBox
|
||||||
$comboBox2 = New-Object System.Windows.Forms.ComboBox
|
$CBdestSite = New-Object System.Windows.Forms.ComboBox
|
||||||
$progressBar1 = New-Object System.Windows.Forms.ProgressBar
|
$progressBar1 = New-Object System.Windows.Forms.ProgressBar
|
||||||
$sourceInfo = New-Object System.Windows.Forms.ToolTip($components)
|
$sourceInfo = New-Object System.Windows.Forms.ToolTip($components)
|
||||||
$label1 = New-Object System.Windows.Forms.Label
|
$label1 = New-Object System.Windows.Forms.Label
|
||||||
|
@ -98,23 +98,23 @@ $Bgo.TabIndex = 1
|
||||||
$Bgo.Text = "GO"
|
$Bgo.Text = "GO"
|
||||||
$Bgo.UseVisualStyleBackColor = $true
|
$Bgo.UseVisualStyleBackColor = $true
|
||||||
#
|
#
|
||||||
# comboBox1
|
# CBsourceSite
|
||||||
#
|
#
|
||||||
$comboBox1.ForeColor = [System.Drawing.Color]::White
|
$CBsourceSite.ForeColor = [System.Drawing.Color]::White
|
||||||
$comboBox1.FormattingEnabled = $true
|
$CBsourceSite.FormattingEnabled = $true
|
||||||
$comboBox1.Location = New-Object System.Drawing.Point(27, 131)
|
$CBsourceSite.Location = New-Object System.Drawing.Point(27, 131)
|
||||||
$comboBox1.Name = "comboBox1"
|
$CBsourceSite.Name = "CBsourceSite"
|
||||||
$comboBox1.Size = New-Object System.Drawing.Size(587, 21)
|
$CBsourceSite.Size = New-Object System.Drawing.Size(587, 21)
|
||||||
$comboBox1.TabIndex = 2
|
$CBsourceSite.TabIndex = 2
|
||||||
#
|
#
|
||||||
# comboBox2
|
# CBdestSite
|
||||||
#
|
#
|
||||||
$comboBox2.ForeColor = [System.Drawing.Color]::White
|
$CBdestSite.ForeColor = [System.Drawing.Color]::White
|
||||||
$comboBox2.FormattingEnabled = $true
|
$CBdestSite.FormattingEnabled = $true
|
||||||
$comboBox2.Location = New-Object System.Drawing.Point(27, 182)
|
$CBdestSite.Location = New-Object System.Drawing.Point(27, 182)
|
||||||
$comboBox2.Name = "comboBox2"
|
$CBdestSite.Name = "CBdestSite"
|
||||||
$comboBox2.Size = New-Object System.Drawing.Size(587, 21)
|
$CBdestSite.Size = New-Object System.Drawing.Size(587, 21)
|
||||||
$comboBox2.TabIndex = 3
|
$CBdestSite.TabIndex = 3
|
||||||
#
|
#
|
||||||
# progressBar1
|
# progressBar1
|
||||||
#
|
#
|
||||||
|
@ -148,8 +148,8 @@ $FMain.ClientSize = New-Object System.Drawing.Size(800, 450)
|
||||||
$FMain.Controls.Add($label2)
|
$FMain.Controls.Add($label2)
|
||||||
$FMain.Controls.Add($label1)
|
$FMain.Controls.Add($label1)
|
||||||
$FMain.Controls.Add($progressBar1)
|
$FMain.Controls.Add($progressBar1)
|
||||||
$FMain.Controls.Add($comboBox2)
|
$FMain.Controls.Add($CBdestSite)
|
||||||
$FMain.Controls.Add($comboBox1)
|
$FMain.Controls.Add($CBsourceSite)
|
||||||
$FMain.Controls.Add($Bgo)
|
$FMain.Controls.Add($Bgo)
|
||||||
$FMain.Controls.Add($menuStrip1)
|
$FMain.Controls.Add($menuStrip1)
|
||||||
$FMain.ForeColor = [System.Drawing.Color]::Snow
|
$FMain.ForeColor = [System.Drawing.Color]::Snow
|
||||||
|
@ -157,7 +157,28 @@ $FMain.MainMenuStrip = $menuStrip1
|
||||||
$FMain.Name = "FMain"
|
$FMain.Name = "FMain"
|
||||||
$FMain.Text = "SharePoint Mover GUI"
|
$FMain.Text = "SharePoint Mover GUI"
|
||||||
|
|
||||||
|
$CBsourceSite.SelectedIndex = 0
|
||||||
|
$CBtargetSite.SelectedIndex = 0
|
||||||
|
|
||||||
|
$MConnexionSharepoint.add_click({
|
||||||
|
|
||||||
|
|
||||||
|
Connect-PnPOnline -Url $tenantURL -Interactive
|
||||||
|
###############On recupere puis stocke la liste des sites dans les box
|
||||||
|
$ComboboxList = (Get-SPOSite | Select Url).name
|
||||||
|
$CBsourceSite.Items.AddRange($ComboboxList)
|
||||||
|
|
||||||
|
$ComboboxList = (Get-SPOSite | Select Url).name
|
||||||
|
$CBtargetSite.Items.AddRange($ComboboxList)
|
||||||
|
###############
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
$Bgo.add_click({
|
||||||
|
|
||||||
|
Move-PnPFile -SiteRelativeUrl $srcSite -TargetUrl $destSite -Force -AllowSchemaMismatch
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue