Push
This commit is contained in:
38
Sharepoint/gui/Re-Link/reLink.ps1
Normal file
38
Sharepoint/gui/Re-Link/reLink.ps1
Normal file
@ -0,0 +1,38 @@
|
||||
$oldPrefix = "\\Srv75008s\juridique"
|
||||
$newPrefix = "%userprofile%\Skornik\Dossiers utilisateurs - Documents\Juridique"
|
||||
|
||||
#$oldPrefix = "\\srv75008s\Commun"
|
||||
#$newPrefix = "%userprofile%\Skornik\Commun - Documents"
|
||||
|
||||
|
||||
$searchPath = "Z:\juridique"
|
||||
|
||||
$dryRun = $FALSE
|
||||
|
||||
$shell = new-object -com wscript.shell
|
||||
|
||||
if ( $dryRun ) {
|
||||
write-host "Dry run..." -foregroundcolor green -backgroundcolor black
|
||||
} else {
|
||||
write-host "Warning : Real run" -foregroundcolor red -backgroundcolor black
|
||||
}
|
||||
|
||||
dir $searchPath -filter *.lnk -recurse | foreach {
|
||||
$lnk = $shell.createShortcut( $_.fullname )
|
||||
$oldPath= $lnk.targetPath
|
||||
|
||||
$lnkRegex = "^" + [regex]::escape( $oldPrefix )
|
||||
|
||||
if ( $oldPath -match $lnkRegex ) {
|
||||
$newPath = $oldPath -replace $lnkRegex, $newPrefix
|
||||
|
||||
write-host "Found: " + $_.fullname -foregroundcolor yellow -backgroundcolor black
|
||||
write-host " Replace: " + $oldPath
|
||||
write-host " With: " + $newPath
|
||||
|
||||
if ( !$dryRun ) {
|
||||
$lnk.targetPath = $newPath
|
||||
$lnk.Save()
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
@ -1,14 +0,0 @@
|
||||
20240307 08:51:28: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:27:01: New-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:33:71 Line | 33 | … ) {$newControl = New-Object System.Windows.Forms.$($Xml.ToString())} | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot find type [System.Windows.Forms.Image]: verify that the assembly containing this type is loaded.
|
||||
20240307 09:28:50: New-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:33:71 Line | 33 | … ) {$newControl = New-Object System.Windows.Forms.$($Xml.ToString())} | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot find type [System.Windows.Forms.Image]: verify that the assembly containing this type is loaded.
|
||||
20240307 09:34:41: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:34:53: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:38:58: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:40:53: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:41:31: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Image" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:44:00: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:44:41: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:45:56: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:47:04: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception setting "Image": "Cannot convert the "System.Drawing.Bitmap" value of type "System.String" to type "System.Drawing.Image"."
|
||||
20240307 09:48:25: ForEach-Object: C:\Users\SebastienQUEROL\git.azuze.fr\ps-scripts\Sharepoint\gui\spmover\Functions.ps1:43:31 Line | 43 | $Xml.Attributes | ForEach-Object { | ~~~~~~~~~~~~~~~~ | Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: 'lbl_byWho' Key being added: 'lbl_byWho'"
|
||||
20240307 11:16:28: InvalidOperation: Line | 45 | $Script:refs['btn_Start'].Add_Click($eventSB['btn_Start'].Cli … | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Cannot index into a null array.
|
Reference in New Issue
Block a user