@setlocal
@if "%1"=="" goto usage
@if "%1"=="/?" goto usage
@if "%1"=="-?" goto usage
@rem Parameter is either a drive letter, or "none"
@rem check for presence of adsutil.vbs
@set adu=%systemdrive%\inetpub\adminscripts\adsutil.vbs
@if exist %adu% goto stopsrv
@echo This tool requires %adu% from the IIS scripts.
@goto fail
:stopsrv
@rem Record what Exchange services are currently running
@echo off
@set StartSA=0
@set StartIS=0
@set StartMTA=0
@set StartWWW=0
For /f "delims=" %%a in ('net start') do if "%%a" == " Microsoft Exchange System Attendant" set StartSA=1
For /f "delims=" %%a in ('net start') do if "%%a" == " Microsoft Exchange Information Store" set StartIS=1
For /f "delims=" %%a in ('net start') do if "%%a" == " Microsoft Exchange MTA Stacks" set StartMTA=1
For /f "delims=" %%a in ('net start') do if "%%a" == " World Wide Web Publishing Service" set StartWWW=1
@echo on
@echo Stopping Exchange services...
net stop msexchangesa /y
@echo Stopping Web services...
net stop w3svc /y
@if "%temp%" == "" set temp="C:\"
@set regfile=%temp%\addm.reg
@echo REGEDIT4 > "%regfile%"
@if "%1"=="none" goto deldrive
@set drive=%1
@set newdrive=%drive:~0,1%
@echo Adding %newdrive% drive mapping to the registry...
@echo [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EXIFS\Parameters] >> "%regfile%"
@echo "DriveLetter"="%newdrive%" >> "%regfile%"
@goto doregedit
:deldrive
@echo removing existing drive letter mapping...
For /f "delims=\=>; tokens=1,2*" %%a in ('subst') do (
if /i "%%c" == " BackOfficeStorage" (
subst %%a /d
)
)
@echo Removing drive mapping from the registry...
@echo [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EXIFS\Parameters] >> "%regfile%"
@echo "DriveLetter"="" >> "%regfile%"
:doregedit
@type %regfile%
regedit -s "%regfile%"
@if errorlevel 0 goto mb
@goto fail
:mb
@echo Touching the metabase to force update of Exchange virtual roots...
cscript %adu% delete /ds2mb/HighWaterMarks
@goto restart
:restart
@echo Restarting services...
@if %StartSA%==1 net start "Microsoft Exchange System Attendant" /y
@if %StartIS%==1 net start "Microsoft Exchange Information Store" /y
@if %StartMTA%==1 net start "Microsoft Exchange MTA Stacks" /y
@if %StartWWW%==1 net start w3svc /y
@goto done
:fail
@echo The operation did not succeed.
@goto end
:done
@echo Done.
@goto end
:usage
@echo Usage: ifsdrive ^<drive-letter^>
@echo ifsdrive none
@echo Modifies or removes the mapping of Exchange storage to a local drive letter.
@echo Specify a single letter to map Exchange storage to that drive.
@echo Specify "none" (without quotes) to remove the mapping.
@goto end
:end
@if not "%regfile%" == "" del "%regfile%"
ifsdrive none
备注: 为删除该映射,请使用完整的“none”一词。ifsdrive 驱动器盘符
驱动器盘符 默认情况下是驱动器 M,但如果 IFS 驱动器映射曾被改为另一个驱动器盘符,那么请改用新的驱动器盘符。271465 XADM: Clients Cannot Access Attachments After You Back Up Drive M(备份驱动器 M 后客户机不能访问附件)
281673 PRB: Moving Items Within Drive M of Exchange Can Remove Item Properties(在 Exchange 的驱动器 M 中移动项目会删除项目属性)
298924 XADM: Do Not Back Up or Scan Exchange 2000 Drive M(不要备份或扫描 Exchange 2000 驱动器 M)
299046 XADM: Calendar Items Disappear from User's Folders(日历项目从用户的文件夹中消失)
303245 XCLN: Item Count Incorrect for Messages with Modified Permission(修改权限后,消息的项目计数错误)
有关与驱动器 M 的防病毒扫描相关的一些问题(与保留驱动器 M 映射有关联)的其他信息,请单击下面的文章编号以查看 Microsoft 知识库中的文章:245822 XGEN: Recommendations for Troubleshooting an Exchange Server Computer with Antivirus Installed(针对安装了防病毒软件的 Exchange Server 计算机的故障排除建议)
298551 XADM: Large Number of Transaction Logs Created(创建了大量事务日志)
| 自由广告区 |
| 分类导航 |
| 邮件新闻资讯: IT业界 | 邮件服务器 | 邮件趣闻 | 移动电邮 电子邮箱 | 反垃圾邮件|邮件客户端|网络安全 行业数据 | 邮件人物 | 网站公告 | 行业法规 网络技术: 邮件原理 | 网络协议 | 网络管理 | 传输介质 线路接入 | 路由接口 | 邮件存储 | 华为3Com CISCO技术 | 网络与服务器硬件 操作系统: Windows 9X | Linux&Uinx | Windows NT Windows Vista | FreeBSD | 其它操作系统 邮件服务器: 程序与开发 | Exchange | Qmail | Postfix Sendmail | MDaemon | Domino | Foxmail KerioMail | JavaMail | Winwebmail |James Merak&VisNetic | CMailServer | WinMail 金笛邮件系统 | 其它 | 反垃圾邮件: 综述| 客户端反垃圾邮件|服务器端反垃圾邮件 邮件客户端软件: Outlook | Foxmail | DreamMail| KooMail The bat | 雷鸟 | Eudora |Becky! |Pegasus IncrediMail |其它 电子邮箱: 个人邮箱 | 企业邮箱 |Gmail 移动电子邮件:服务器 | 客户端 | 技术前沿 邮件网络安全: 软件漏洞 | 安全知识 | 病毒公告 |防火墙 攻防技术 | 病毒查杀| ISA | 数字签名 邮件营销: Email营销 | 网络营销 | 营销技巧 |营销案例 邮件人才:招聘 | 职场 | 培训 | 指南 | 职场 解决方案: 邮件系统|反垃圾邮件 |安全 |移动电邮 |招标 产品评测: 邮件系统 |反垃圾邮件 |邮箱 |安全 |客户端 |