我已使用以下查询列出Windows 2008服务器中的用户,但失败并得到以下错误.
$server='client-pc-1';$pwd= convertto-securestring 'password$' -asplaintext -
force;$cred=new-object -typename System.Management.Automation.PSCredential -argumentlist 'Administrator',$pwd; invoke-command -computername $server -credential
$cred -scriptblock {Get-ADUser -Filter (enabled -ne $true)}
Run Code Online (Sandbox Code Playgroud)
例外如下:任何人都可以帮我解决这个问题吗?
The term 'Get-ADUser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct
and try again.
+ CategoryInfo : ObjectNotFound: (Get-ADUser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Run Code Online (Sandbox Code Playgroud) 我从以下代码块中得到以下异常.
解析EntityName时发生错误.第1行,位置844.
我试图将从表中检索到的数据集解析为数据集.
public DataSet BindMasterData(string xml)
{
DataSet ds = null;
try
{
ds = new DataSet();
TextReader txtReader = new StringReader(xml);
XmlReader reader = new XmlTextReader(txtReader);
ds.ReadXml(reader);
}
catch (Exception ex)
{
return new DataSet();
}
return ds;
}
Run Code Online (Sandbox Code Playgroud)
我已经找出了异常的原因,但我无法解决它.在这种特殊情况下,字符串(从DB检索)包含一个特殊字符(&).这导致例外.我怎么解决它.对此的任何帮助都会很棒.
谢谢你,塞巴斯蒂安
我希望使用powershell(或WMI)查询找到IIS的版本.
以下是我使用的查询.
Get-WmiObject -namespace "root\microsoftiisv2" -query "select MajorIIsVersionNumber from IISWebInfo"
Run Code Online (Sandbox Code Playgroud)
我在带有'IIS 8'的'Windows 8'PC中使用powershell控制台测试了此查询.但结果是7,其中预期的版本号是8.
有人可以帮我解决这个问题吗?
我有一个WPF outlook加载项,它是在Visual Studio 2008中使用C#开发的.它在Microsoft Outlook 2003,2007和2010上运行良好.但是当我在Outlook 2013中安装它时,它没有被激活.当我尝试激活它时,会出现以下异常.
未加载:在Outlook 2013中加载com add期间发生运行时错误
如果您遇到过这样的情况并找到解决方案,请指导我.
我试图在(远程)Windows 2012服务器中添加.net 3.5功能.但我得到以下例外.
您是否需要指定备用源路径?一个或多个安装选择缺少目标服务器上的源文件.服务器将尝试从Windows Update或组策略指定的位置获取缺少的源文件.您还可以单击此页面上的"指定备用源路径"链接,以提供源文件的有效位置.
我试图使用框架3.5的设置下载和安装,但也失败了.
我从下面的URL中看到了几种解决方法
http://support.microsoft.com/kb/2734782
是否可以在不使用安装介质(OS)的情况下添加.net 3.5
任何有关这方面的帮助将不胜感激.
我最近在wcf REST服务的web.config文件中进行了更改,我刚刚添加了maxBufferSize="10485760"属性.请在下面找到代码段...
<wsHttpBinding>
<binding name="WSHttpBinding_IService" closeTimeout="00:04:00"
openTimeout="00:04:00" receiveTimeout="00:04:00" sendTimeout="00:04:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode=
"StrongWildcard" maxBufferSize="10485760" maxBufferPoolSize="2147483647"
maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8"
useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647"
maxArrayLength="2147483647" maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<reliableSession ordered="true" inactivityTimeout="00:04:00" enabled="false" />
</binding>
</wsHttpBinding>
Run Code Online (Sandbox Code Playgroud)
进行更改后,应用程序无法正常工作,它会抛出以下异常.
配置错误说明:处理为此请求提供服务所需的配置文件时发生错误.请查看下面的具体错误详细信息并相应地修改配置文件.分析器错误消息:无法识别的属性'maxBufferSize'.请注意,属性名称区分大小写.
如果有人可以提供帮助,那就太好了.
我试图找到一个powershell(或WMI)查询来查找PC中磁盘空间利用率的总和.我有以下查询......

但正如您在图像中看到的那样,它为每个驱动器显示单独的行.如何获得磁盘空间总量.
塞巴斯蒂安
我在Windows 2012服务器中安装Web应用程序(也是REST服务)时遇到问题.我已经创建了一个基本的asp.net网站和web设置项目.当我尝试在Windows 2012服务器中安装它时,安装失败并出现"安装不完整"异常.
当我在安装这个msi时尝试写日志时,我得到了以下日志文件(MainEngineThread返回1603),我无法找到此失败的确切原因.

=== Verbose logging started: 3/27/2014 6:25:05 Build type: SHIP UNICODE 5.00.9600.00 Calling process: C:\Windows\system32\msiexec.exe ===
MSI (c) (84:C8) [06:25:05:282]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (84:C8) [06:25:05:282]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
MSI (c) (84:C4) [06:25:05:282]: Resetting cached policy values
MSI (c) (84:C4) [06:25:05:282]: Machine policy value 'Debug' is 0
MSI (c) (84:C4) [06:25:05:282]: ******* RunEngine:
******* Product: C:\Users\Administrator\Desktop\WebSetup1.msi
******* Action: …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用device_idWindows Phone 8.我尝试这样做:
byte[] myDeviceID = (byte[])Microsoft.Phone.Info.DeviceExtendedProperties.GetValue("DeviceUniqueId");
string DeviceIDAsString = Convert.ToBase64String(myDeviceID);
Run Code Online (Sandbox Code Playgroud)
还有这个:
DeviceExtendedProperties.GetValue("DeviceUniqueId").ToString();
Run Code Online (Sandbox Code Playgroud)
两者都导致以下异常:
Microsoft.Phone.ni.dll中出现"System.UnauthorizedAccessException"类型的异常,但未在用户代码中处理
其他信息:访问被拒绝.(HRESULT异常:0x80070005(E_ACCESSDENIED))
我该如何解决这个问题?
c# ×3
powershell ×3
diskspace ×1
framework3.5 ×1
iis ×1
rest ×1
wcf ×1
web-config ×1
windows-8 ×1
wmi ×1
wpf ×1
xml ×1