停止 Windows 服务时出错 [英] Error stopping a Windows Service

查看:62
本文介绍了停止 Windows 服务时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows Server 2003 x64 上使用 PowerShell 1.0.执行以下语句时,出现以下错误.不是每次都出现这个错误,而且如果出现这个错误,我再次执行这个命令,就不会再报错了!这太奇怪了.任何想法出了什么问题?

I am using PowerShell 1.0 on Windows Server 2003 x64. When executing the following statement, there is error below. Not every time this error occurs, and if this error occurs and I execute this command again, there is no error again! It is so weird. Any ideas what is wrong?

Stop-Service "SQLServerAgent" -Force -ErrorAction:stop

WARNING: Waiting for service 'SQL Server Agent (MSSQLSERVER) (SQLSERVERAGENT)' 
to finish stopping...
out-lineoutput : The OS handle's position is not what FileStream expected. Do n
ot use a handle simultaneously in one FileStream and in Win32 code or another F
ileStream. This may cause data loss.

提前致谢,乔治

推荐答案

这是 PowerShell 中的错误.

This is bug in PowerShell.

有关变通方法,请参阅 Lee Holmes 的帖子:操作系统句柄的位置不是 FileStream 预期的位置

Please see Lee Holmes' post for a Workaround: The OS handle's position is not what FileStream expected

这篇关于停止 Windows 服务时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆