50 lines
1.7 KiB
Batchfile
50 lines
1.7 KiB
Batchfile
@ECHO OFF
|
|
REM ----------------------------------------------------------------------------
|
|
REM Copyright (c) 2024 by Digital Data GmbH
|
|
REM
|
|
REM Digital Data GmbH • Ludwig-Rinn-Strasse 16 • D-35452 Heuchelheim
|
|
REM Tel.: 0641/202360 • E-Mail: info-flow@digitaldata.works
|
|
REM ----------------------------------------------------------------------------
|
|
REM Creation Date / Author: 06.01.2024 / MK
|
|
REM Version Date / Editor: 08.10.2024 / MK
|
|
REM Version Number: 1.2.0.0
|
|
|
|
pushd "%~dp0"
|
|
|
|
SET DFSRSERVER=172.24.11.1
|
|
SET DFSRROOTPATH=\\dd-gan.local.digitaldata.works\dd-dfsr01
|
|
SET DFSRSERVERPATH=\\DD-STO01\DD-STO01-A2$
|
|
|
|
ping -n 1 %DFSRSERVER% >nul
|
|
IF %errorlevel% equ 0 (
|
|
ECHO Der primäre Server %DFSRSERVER%, ist erreichbar!
|
|
SET DFSRSERVERPATH=\\DD-STO01\DD-STO01-A2$
|
|
GOTO :SetDFSR
|
|
|
|
) else (
|
|
ECHO Der primäre Server %DFSRSERVER%, ist nicht erreichbar!
|
|
SET DFSRSERVERPATH=\\DD-VMP09-STO01\DD-VMP09-STO01-A3-ZFS$
|
|
SET DFSRSERVER=172.24.11.92
|
|
)
|
|
|
|
ping -n 1 %DFSRSERVER% >nul
|
|
IF %errorlevel% equ 0 (
|
|
ECHO Der sekundäre Server %DFSRSERVER%, ist erreichbar!
|
|
SET DFSRSERVERPATH=\\DD-VMP09-STO01\DD-VMP09-STO01-A3-ZFS01$
|
|
GOTO :SetDFSR
|
|
|
|
) else (
|
|
ECHO Der sekundäre Server %DFSRSERVER%, ist nicht erreichbar!
|
|
ECHO DFSR Server kann nicht gesetzt werden!
|
|
GOTO :EOF
|
|
)
|
|
|
|
:SetDFSR
|
|
dfsutil.exe client property state active %DFSRROOTPATH%\ArchivedObjects %DFSRSERVERPATH%\ArchivedObjects
|
|
dfsutil.exe client property state active %DFSRROOTPATH%\ServerObjects %DFSRSERVERPATH%\ServerObjects
|
|
dfsutil.exe client property state active %DFSRROOTPATH%\SharedObjects %DFSRSERVERPATH%\SharedObjects
|
|
dfsutil.exe client property state active %DFSRROOTPATH%\UserObjects %DFSRSERVERPATH%\UserObjects
|
|
|
|
:EOF
|
|
timeout /t 10
|
|
exit |