Windows error 0x80041001, -2147217407

Detailed Error Information

HRESULT analysis[1]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode4 (0x004)
NameFACILITY_ITF[1][2]
DescriptionThe source of the error code is COM/OLE Interface management.[1][2]
Error Code4097 (0x1001)

Questions

3votes
2answers

Powershell not allowing me to use disable-pnpdevice with Bluetooth devices

I asked this question a few days ago, How to connect and remove bluetooth in windows powerhell, but whenever I try running the code: $device = Get-PnpDevice | Where-Object {$_.Class -eq "Bluetooth" -and $_.FriendlyName -eq "MX Master 2S"} Disable-PnpDevice -InstanceId $device.InstanceId -Confirm:$false Start-Sleep -Seconds 10 Enable-PnpDevice -InstanceId $device.InstanceId -Confirm:$false I [...] read more
powershell
bluetooth
plug-and-play
3votes
2answers

How do I Edit a .cs file in a Add-In Project using DTE

I'm trying to write my first add-in for vs2010, but im struggling. I have a assembly that generates lots of cs files. I want my plugin to add new files to the select project or if the files exist, overwrite them. I'm having 2 problems: 1. When I add a [...] read more
visual-studio
visual-studio-2010
add-in
envdte
1vote
0answers

Disable-PnpDevice while device is used?

I have a webcam which i want to deactive via powershell script. I have the following line: Get-PnpDevice -FriendlyName 'USB-Videogerät' -Class Camera | Disable-PnpDevice -Confirm:$false But it only works when no program uses the webcam. Is it even possible to deactive a device even though its used by discord or [...] read more
powershell
1vote
1answer

How can I update LDAP attributes on the "ds_computer" class through WMI using PowerShell

I am unable to update an instance of the ds_computer WMI class within the root\directory\ldap namespace using PowerShell. However I am able to update the same instance using C#. Here is my working C# code: string computerName = Environment.GetEnvironmentVariable("ComputerName"); var connectionOptions = new ConnectionOptions(); connectionOptions.Impersonation = ImpersonationLevel.Impersonate; connectionOptions.Authentication = AuthenticationLevel.PacketPrivacy; [...] read more
c#
.net
powershell
ldap
wmi
1vote
0answers

Powershell Get-PnpDevice fails

When running this PS command as an administrator, I get an error I can't figure out. PS C:\WINDOWS\system32> get-pnpdevice -status UNKNOWN -class 'Monitor' | disable-pnpdevice Confirm Are you sure you want to perform this action? Performing the operation "Disable" on target "Win32_PnPEntity: Generic PnP Monitor (DeviceID = "DISPLAY\NEC6865\4&1919A1B7&0&UID224795")". [Y] Yes [...] read more
powershell
1vote
1answer

Delphi: intercept SWbemServices.ExecQuery error

I'm implementing a WMI interface in Delphi VCL, I managed to have it working, but I'm now trying to make it a little more robust. The portion of code I'm working on is this: var FWbemServices: ISWbemServices; WMIObject: ISWbemObjectSet; WMISQLQuery: String; FCount: Integer; ... FWbemServices := FWbemLocator.ConnectServer('', 'root\CIMV2', '', '', [...] read more
vb.net
delphi
error-handling
wmi
msdn
1vote
1answer

Reordering methods in ComImport interfaces throws COMException (0x80041001)

Consider the following code for COM interop with internet shortcuts: [ComImport] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [Guid("CABB0DA0-DA57-11CF-9974-0020AFD79762")] public interface IUniformResourceLocatorW { void SetUrl([MarshalAs(UnmanagedType.LPWStr)] string pcszUrl, int dwInFlags); void GetUrl([MarshalAs(UnmanagedType.LPWStr)] out StringBuilder ppszUrl); void InvokeCommand(IntPtr purlici); } [ComImport] [Guid("FBF23B40-E3F0-101B-8488-00AA003E56F8")] public class InternetShortcut { } The following works as expected: var ishort = new InternetShortcut(); ((IPersistFile)ishort).Load("MyLink.url", [...] read more
c#
.net
com
com-interop
1vote
0answers

WMI ping failed (0x80041001 - Generic error)

I have an application which uses WMI to perform several tasks, one of them is pinging remote machines. For ping I use the following query: SELECT * FROM Win32_PingStatus WHERE Address='192.168.0.1' AND Timeout=3000 AND StatusCode=0 On several systems this works perfectly right. But on some machines this query returns 0x80041001 [...] read more
windows
wmi
ping
1vote
0answers

Not able to open SQL Sever 2008 Configuration Manager

I'm getting the below message when i try and access SQL Config Manager on my Windows Server 2003 R2 "Cannot connect to WMI provider. You do not have permission or the server is unreachable. Note that you can only manage SQL Server 2005 and later servers with SQL Server Configuration [...] read more
sql-server-2008
0votes
0answers

Powershell Get-WmiObject generic-failure

I'm struggling with a wmi query (running in Administrator Powershell) that is failing with a generic failure... Get-WmiObject -Class win32_pnpdevice results in: Get-WmiObject : Generic failure At line:1 char:14 + Get-WmiObject <<<< -Class win32_pnpdevice + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException + FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand This happens on Windows 10 [...] read more
powershell
wmi
get-wmiobject
0votes
0answers

Can Not Enable To FilleStream

I have sql server v2016 on windows server D V2016 . i can not enable to FileStrem.error Code (0x80041001) Error Image [https://i.stack.imgur.com/Bsdu6.png] New Image [https://i.stack.imgur.com/eW8OQ.png] read more
sql-server
sqlfilestream
0votes
1answer

Using WMI to search in MicrosoftDNS_AType records cause generic failure

All day long trying to fix 0x80041001 error, but it's still shows that error. Turning firewall off, UAC off, didn't work. reseting WMI service, trying this, Running as administrator, still nothing changed! It's my code: ManagementScope mgmtScope = new ManagementScope(@"\\.\Root\MicrosoftDNS", new ConnectionOptions() { }); ManagementObjectCollection mgmtDNSRecords = new ManagementObjectSearcher(mgmtScope, new [...] read more
c#
dns
wmi
wmi-query
wmi-service
0votes
1answer

Error while fetching null valued array columns in WQL (WMI Query Language)

I'm little new to world of WQL (WMI Query Language). I'm trying to query ConfigMgr 2012 using WQL but I'm facing an error when I try to mention the name of a column in the comma separated select clause. The error happens ONLY when the column being fetched is of [...] read more
wmi-query
sccm
wql
0votes
1answer

cscript prnport.vbs Remote Desktop Connection Error 0x80041001 Generic failure

I'm trying to run the following command on a remote server (Windows Server 2008r2) but it comes up with 0x80041001 Generic failure - I am running CMD in Admin mode and I know the script works as it will run on my local Windows 8 PC. Any advice would be [...] read more
windows
cmd
server
wsh
0votes
1answer

Error: 0x80041001 when running VBScript to enumerate software

When I ran a VBScript on a windows8.1 machine, I got the following error. Same code ran successfully on other machines. Error: 0x80041001 Code: 80041001 Source: (null) The error line is 'For each ...' Code: 'obtain collection of Windows Installer packages Set MSIapps = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & Computer & "\root\cimv2").ExecQuery("select * [...] read more
windows
vbscript
0votes
1answer

Visual Studio 2010 EnvDTE.EditPoint Insert function returning 'Exception from HRESULT: 0x80041001'

Overview: Microsoft Visual Studio is a tool in and of itself. Pun intended. I am trying to use EnvDTE from a System.Windows.Window that is being used as a plugin for Visual Studio. I do not want to access the project from which the plugin was created, rather the currently open [...] read more
c#
.net
visual-studio-2010
visual-studio
0votes
1answer

Win32_PerfFormattedData_Tcpip_NetworkInterface unavailable

I am trying to use a VBScript to query bandwidth usage of my network card. But the query errors out. Set colItems = objWMIService.ExecQuery _ ("select * from Win32_PerfFormattedData_TCPIP_NetworkInterface " ) For Each objItem in colItems WScript.Echo objItem.CurrentBandwidth NEXT I also tried this variation, and it doesn't work either. Set [...] read more
windows
networking
wmi
-1votes
1answer

SCCM client error after Windows 10 upgrade

I've upgraded the Windows 10 to 1809 for test purposes and now the SCCM client has the problem that it needs a very long time until it starts and then aborts with the error: Loading Software Center returned error code 0x80041001 (-2147217407). Unfortunately I do not really find much under [...] read more
windows
upgrade
sccm

Comments

Leave a comment

(plain text only)

Sources

  1. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  2. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0