Passaggio all'ora legale 31 marzo 2024 02:00 03:00 sposta avanti l'orologio di 1 ora (si dorme 1 ora in meno)
Apre un lob system (XML) dei BDC di SharePoint 2007, modifica il nome del server e lo salva con il nuovo nome
PowerShell
# se non funge lanciare prima da linea di comando
# Set-ExecutionPolicy RemoteSigned
# eseguire con: powershell .\ChangeServer.ps1 <lobsystemxml> <newservername>
# apre un lob system e modifica il nome del server DBC SharePoint

Param (
	[string]$lobName = $(throw "Insert a lob file name."),
	[string]$dbServer = $(throw "Insert a DB server name.")
)

write-host "File: $lobName"
write-host "Server: $dbServer"

[xml]$lob = Get-Content $lobName
$props = $lob.LobSystem.LobSystemInstances.LobSystemInstance.Properties.Property
$props | Where-Object {$_.Name -eq "RdbConnection Data Source"} | ForEach-Object {$_."#text" = $dbServer}

#lo risalvo con lo stesso nome
$lob.Save("$PWD\$lobName")
Potrebbe interessarti anche: