WMI API
Hi,
I'm writing a script with WMI objects where I need f.ex. to shutdown a bunch of servers.
I don't understand the microsoft wmi api documentation:
WIN32_OPERATINGSYSTEM shutdown method
Nothing is written about the win32_operatingsystem and which value the shudown() method returns ?
How do you know which value is returned, is that documented
somewhere ?
I know I can use f.ex. get-member
but why isn't the returned value documented in the api, do I have to look somewhere else?
Thanks a lot!
Didier
PowerShell way
Get-Content = C:\Temp\Serverlist.txt
foreach($servers in $server){
(Get-WmiObject -Class Win32_OperatingSystem -ComputerName $servers).Win32ShutDown(12)
Where 12 is for Force Power off.
Refer this
link for values
Regards Chen V [MCTS SharePoint 2010]
Similar Messages
-
How to get Scavenged Records from Windows DNS Server uisng WMI API Call?
Hi Guys,
I'm facing one problem to find below things,
DNS Server have list of zones and each zones may have DNS Records. DNS Server provides an option set scavenging interval on server or in zone level.
Once records are old the server automatically apply scavenging process to remove that record.
I need to get DNS Records that are scavenged and timestamp using WMI Call?
sharavannaThe DNS log has this information. Just extract it from the log.
A scavenged record does not exisit when it is scavenged so it cannot be read from the DNS server. It has been deleted.
¯\_(ツ)_/¯ -
Item Level Targetting - does it use WMI in the background?
Hi everyone,
How does Item Level Targetting work in the background?
Is it just basically a WMI API? For instance, when using ILT, what is the query language for finding if a file is a specific version? "Select version from CIM_Datafile where ...." or is it a Powershell command, etc?
Which would be quicker - having a GPO with one WMI filter, or a GPO with a few ILT GPP settings.
I ask because my organization is of the opinion that WMI filters on GPOs should try and be avoided in place of GPP ILTs.
Regards,
Michael> This is a quote from Martin Binder MVP - It should answer your query
> (just about) Im sure Martin will add to this!
Yes, he will :-))
http://evilgpo.blogspot.de/2014/11/showdown-wmi-filter-vs-item-level.html
> It uses "appropriate" APIs - ILT is much faster than WMI in most cases,
> unless you use ILT with a WMI query, of course :) And no, I don't know
> which APIs they use for this or that ILT item.
The above statement is still true - my post deals with a very fast WMI
class...
One example - You need a filter for a service that is installed and set
to automatic startup. You have two choices to filter for this service:
a) Select Name From Win32_Service Where Name="yourservice" And
StartMode="Auto"
This is the kind of filter almost everyone on the planet will use. And
it is DAMN SLOW.
b) Registry ILT:
HKLM\System\CurrentControlSet\Services\yourservice:Start (REG_DWORD)
exists and has a value of 2
Guess which one will outperform the other one?
Martin
Mal ein
GUTES Buch über GPOs lesen?
NO THEY ARE NOT EVIL, if you know what you are doing:
Good or bad GPOs?
And if IT bothers me - coke bottle design refreshment :)) -
Set VLAN ID on a virtual machine network on Windows 2012
I'm currently working in C# consuming Hyper-V V2 WMI API to do different tasks related to virtual machines. I've not been able to figure out how to get/set VLAN ID. I've found many links on net pointing to PS HyperV lib exploring "Get-VMNICVLAN"
and "Set-VMNICVLAN" but they dont seem to be working from me as Nic.connection[0] always seem to be null in my case. Perhaps that only works with Windows 2008 Hyper-V.
Also I'm not familiar with WMI scripts much so converting that code to C# is being a pain. Can someone please tell me exactly how to do so in C# using WMI.
Regards
UsmanHello Brian
Thanks for your reply. Perhaps V1 and V2 are not only namespaces since there are many class names, method names, parameter names are different, or perhaps I didnt work with the standard way with V1. Like "msvm_VirtualSwitch" changed to "msvm_VirtualEthernetSwitch",
"msvm_VirtualSystemGlobalSettingData" to "msvm_VirtualSystemSettingData" and specific for VLAN "Msvm_VLANEndpointSettingData" to "MSVM_EthernetSwitchPortVLanSettingData" and many more places.
I would easily set VLANID using code below in V1
string szArg = szArg = "NetworkVSP:" + szSwitch + @"\\" + szSwitchPort;
ManagementObject vlansettingdata = this.wmi.GetWmiObject("Msvm_VLANEndpointSettingData", "InstanceID Like 'Microsoft:{0}%'", new object[] { szArg });
vlansettingdata.SetPropertyValue("AccessVLAN", nVlanid);
vlansettingdata.Put();
But now even having reached the vlansettingdata object in V2, I get a "Generic Error" on calling vlansettingdata.Put(); Here's a snippet of code I'm using in V2, which may be wrong
ManagementObjectCollection vlansSettings = switchPortObj.GetRelated("MSVM_EthernetSwitchPortVLanSettingData");
ManagementObject vlanSettingsData = null;
if (vlansSettings != null)
foreach (ManagementObject settingData in vlansSettings)
if (settingData != null)
vlanSettingsData = settingData;
break;
if (vlanSettingsData != null)
vlanSettingsData.SetPropertyValue("OperationMode", "1");
vlanSettingsData.SetPropertyValue("AccessVLANID", nVlanid);
vlanSettingsData.Put();
IsVlanSet = true;
Forgive my ultimately dirty raw code, its just part of a test app that's getting uglier with desperate attempts to succeed.
Regards
Usman -
Running commands on VMs remotely
Hi Everyone
New to all of this so please bear with me!
Starting a new project and looking to compare between the use of Hyper V and ESXi.
The project is to grab vms regardless of state, turn them on and execute scripts stored on a vm drive. The script execution has to be performed / issued by a user. C# is the main underlying code but we can potentially put in references to use powershell
scripts / whatever else if we can achieve this using hyper v.
I know from doing a bit of reading on ESXi that we can do this using a number of ways - vmrun to start, stop and run commands on the actual vm itself. using other vmware libraries and APIs.
I have read that powershell commands include starting vms, taking snapshots, shutting down vms but I was wondering if we can get into the actual VM remotely / somehow in-order to, for example, run a script which is stored on that VMs C drive.
Has anyone tried this / is it do-able? - I have had no luck finding any examples of what we need.
Kind Regards,
AshleyI have a few things that I have done historically.
Really, you have two options. a WMI (API) call or a WinRM / PowerShell remoting call.
The difference between the two is 1) security settings and 2) ease of use.
For WinRM the security needs to be more open then WMI. But, it is far easier to script as you simply open a remote session and you keep scripting along in the remote shell (the tricky part is pulling values back to the local session). With WMI
you always get the values back since you never spawn into another session.
Below is a WinRM example of using WinRM and returning some value back:
It executes a WMI command on the remote machine to fin the file I am looking for (as that is faster) and then I read the file with the script.
# This block of script executes remotely and returns the content of hte CtxSta.config file.>
$sta = invoke-command -Session $s -ScriptBlock {
$staArray = get-wmiobject CIM_DataFile -filter 'Extension="config" and FileName="CtxSta"'
# If IIS Integration is installed there could be multiples, this is the one that CSG is hard coded to use.
foreach ($e in $staArray) {
if ($e.Path -match "citrix\\system32") {
$sta = $e
get-content -path ([string]$sta.Name)
# We have returned to local execution.
foreach ($e in $sta) {
switch -wildcard ($e) {
"UID*" {
$e = $e -replace "UID", ""
$e = $e -replace "=", ""
$e = $e -replace " ", ""
$staId = $e
$staId
Brian Ehlert
http://ITProctology.blogspot.com
Learn. Apply. Repeat. -
Invoke-WSManAction command and CIM Object references
Hi,
I am using powershell on my Windows Server 2008 R2 system to invoke a CIM class method that takes a reference object argument. The signature of the method is something like:
uint32 DoSomething([IN, Description(" Does something ")] CIM_LogicalPort ref Target);
The command I use to invoke this method is:
PS C:\Users\Administrator> $list = Get-WSManInstance -Enumerate -ResourceURI "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_FCPort" -ReturnType EPR
PS C:\Users\Administrator>
PS C:\Users\Administrator> invoke-wsmanaction -action DoSomething -resourceuri "http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_SoftwareInstallationService" -selectorset @{CreationClassName="CIM_SoftwareInstallationService";Name="CIM_SoftwareInstallationService";SystemCreationClassName="CIM_ComputerSystem";SystemName="testServer"}
-ValueSet @{Target=$($list[0].InnerXml)}
xsi : http://www.w3.org/2001/XMLSchema-instance
p : http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_SoftwareInstallationService
cim : http://schemas.dmtf.org/wbem/wscim/1/common
lang : en-US
ReturnValue : 32968
PS C:\Users\Administrator>
Though the command execution succeeds, the CIM Provider fails as the reference argument passed in the powershell command reaches the provider as NULL.
My questions are:
1. What is the right way to pass the CIM objects by reference to the methods?
2. Is the syntax of the commands I am using correct?
Notes:
- I have tried the same thing with "winrm" and "Invoke-CIMMethod" commands as well, but with the same failure.
- The same commands seem to have worked for some people in a similar scenario (http://somethingaboutcode.wordpress.com/2009/11/09/invoking-hyper-v-wmi-api-methods-with-reference-parameters-using-ws-management/).
I really appreciate any help on this.
Cheers,
VenuHello AnnaWY,
First of all, thanks for the reply.
In fact, that is the link I followed to get my commands and it was very helpful. I think the EPR is reaching the WINRM server as it is supposed to (I have verified it with wireshark capture when executing the command remotely; copy-pasted below), but when
it reaches the CIM Provider, it is NULL. I suspect one of the below might be happening:
1. WINRM is not able to get the object from the EPR.
2. WINRM is passing the argument as NULL when invoking the method.
3. Something could be going wrong during marshalling (?!!).
Is there a way to know which one of the above is the case?
Please note: I have tried enabling the "WMI" and "Windows Remote Management" traces and it didn't help much.
Thanks again,
Venu
REQUEST
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd">
<s:Header>
<a:To>http://10.192.203.53:5985/wsman</a:To>
<w:ResourceURI s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_SoftwareInstallationService</w:ResourceURI>
<a:ReplyTo>
<a:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
</a:ReplyTo>
<a:Action s:mustUnderstand="true">http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_SoftwareInstallationService/DoSomething</a:Action>
<w:MaxEnvelopeSize s:mustUnderstand="true">153600</w:MaxEnvelopeSize>
<a:MessageID>uuid:2A713DC6-F79A-452F-9AA6-D19D9A929C9B</a:MessageID>
<w:Locale s:mustUnderstand="false" xml:lang="en-US"/>
<w:OperationTimeout>PT60.000S</w:OperationTimeout>
<w:SelectorSet>
<w:Selector Name="CreationClassName">CIM_SoftwareInstallationService</w:Selector>
<w:Selector Name="Name">CIM_SoftwareInstallationService</w:Selector>
<w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector>
<w:Selector Name="SystemName">testServer</w:Selector>
</w:SelectorSet>
</s:Header>
<s:Body>
<p:DoSomething_INPUT xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_SoftwareInstallationService">
<p:Target>
<a:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>
<a:ReferenceParameters>
<w:ResourceURI>http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_FCPort</w:ResourceURI>
<w:SelectorSet>
<w:Selector Name="CreationClassName">CIM_FCPort</w:Selector>
<w:Selector Name="DeviceID">0000ABCDABCD0000</w:Selector>
<w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector>
<w:Selector Name="SystemName">testServer</w:Selector>
</w:SelectorSet>
</a:ReferenceParameters>
</p:Target>
</p:DoSomething_INPUT>
</s:Body>
</s:Envelope>
RESPONSE
<s:Envelope xml:lang="en-US" xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd"
xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd">
<s:Header>
<a:Action>http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_SoftwareInstallationService/DoSomethingResponse</a:Action>
<a:MessageID>uuid:25561441-A48B-4DDF-B201-BDD00024EC25</a:MessageID>
<a:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:To>
<a:RelatesTo>uuid:2A713DC6-F79A-452F-9AA6-D19D9A929C9B</a:RelatesTo>
</s:Header>
<s:Body>
<p:DoSomething_OUTPUT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wmi/root/****/CIM_SoftwareInstallationService" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common">
<p:ReturnValue>32968</p:ReturnValue>
</p:DoSomething_OUTPUT>
</s:Body>
</s:Envelope> -
Many instances of Event 5858 from WMI-Activity are appearing in the Microsoft-Windows-WMI-Activity/Operational log.
An example of the event message text is "Id = {BA4361BF-423A-0001-1284-43BA3A42CD01}; ClientMachine = SERVER1; User = SERVER\bnf1; ClientProcessId = 928; Component = Unknown; Operation = Start IWbemServices::ExecQuery - root\cimv2 : SELECT * FROM Win32_ComputerSystem;
ResultCode = 0x80041032; PossibleCause = Unknown
Is there a solution or a workaround?
Thanks.The core problem for this set of issues is that the WMI error event ID 5858 is being generated generically and is not only representing functional error conditions.
Unfortunately, for application/backwards compatibility, we can’t just get rid of it, because people have gone to the effort of parsing the event (more below) to look for the instances where there is useful data.
Event 5858 is generated any time there is an error returned to the WMI client API. Many of these “errors” are behaviors that the client application handles (for example, checking
for something that is not present), so seeing event 5858 does not tell you enough. The user data section of the event has the information to explain if the problem is important, but it must be parsed. That makes this event hard to use for monitoring, so some
notes on that are at the end.
To understand WMI event 5858, the key elements are in userdata, specifically:
ResultCode – this tells you the real reason event is generated, and is the most valuable piece of information. More info is below, but searching TechNet for the ResultCode will
usually give you the information you need.
Operation – the relevant info follows “Start IWbemServices::”, and tells you what WMI was asked to do. This includes run a query, enumerate/create/delete instances, look for
a class, etc. There is a full list here: //msdn.microsoft.com/en-us/library/windows/desktop/gg196568(v=vs.85).aspx
User – it sometimes it helps to know what account was trying to do the Operation, particularly if the ResultCode is 0x80041003 – Access Denied.
ResultCode details: There is a good list of ResultCodes here: //support.microsoft.com/kb/295821.
The ones listed in this thread are:
0x80041032 – Call Cancelled. The client application cancelled the request that was made. That is almost always ignorable as a WMI error. The component or application (SCCM,
or Group Policy) for example) that was calling into WMI cancelled the request, and will likely generate its own event if it is important to do.
0x8004100A – Critical Error. This could be a significant problem, and should be investigated. The WMI infrastructure is not working properly. You can either use WMIDiag (see
this article: //blogs.technet.com/b/askperf/archive/2012/02/03/wmidiag-2-1-is-here.aspx)
or from an elevated command prompt run Winmgmt –VerifyRepository.
0x80041002 – Not Found. This is usually ignorable by itself. It means that WMI could not find the instance of a class that was requested, which is not unusual.
0x8004100F – Invalid Object. This could be a significant problem and should be investigated. It could be a problem where the WMI provider is badly written, or it could be an
issue within the WMI repository. See Troubleshooting below.
Operation details – This begins with “Start IWbemServices::”, then the actual operation, with parameters you can use to find out more info. Examples from the thread above are:
ExecQuery – run a WMI query. The structure is ExecQuery - <namespace> : <query>. Example is ExecQuery - root\CIMV2 : select * from Win32_OperatingSystem Where ProductType!=2
or ProductType!=3. You can use the PS command get-wmiobject –namespace (insert the namespace) –query “(insert the query portion)”
DeleteInstance – delete a specific instance of a WMI class. Looks like: DeleteInstance - <namespace>: <instance information>. Example is DeleteInstance - Root\Rsop\User\S_1_5_21_1447720405_913420198_1853421413_1156
: RSOP_ExtensionStatus.extensionGuid="{1A6364EB-776B-4120-ADE1-B63A406A76B5}".
CreateInstanceEnum – sets up to enumerate all instances of a class. Structure is CreateInstanceEnum - <namespace> : <classname>.
Troubleshooting:
As noted, some of the issues listed above are important to understand. There are some good topics on WMI Troubleshooting in TechNet, so I won’t try to repeat them. There is
a generally good article here:
technet.microsoft.com/en-us/magazine/2006.09.wmievents.aspx.
The most critical things to check for are repository issues, which you can do either using WMIDiag (see this article:
blogs.technet.com/b/askperf/archive/2012/02/03/wmidiag-2-1-is-here.aspx) or from an
elevated command prompt run Winmgmt –VerifyRepository, and confirm that the repository is in good shape.
Monitoring:
You have to parse event 5858 to get the critical info, so other events are easier to use
for monitoring. The most critical events to watch for relating to WMI are still in the Windows-Application log, not Microsoft-Windows-WMI-Activity/Operational log (where event 5858 is found). All of the most serious errors that will show up with an event 5858
will also have something in the Windows-Application log. Documentation for the most relevant events are listed in multiple topics under this reference:
//technet.microsoft.com/en-us/library/cc727020(v=ws.10).aspx
In summary:
Event 5858 is confusing, generally ignorable, and unfortunately not something we can get rid of easily. It does provide valuable information if you know how to parse it. The
most relevant information is the ResultCode in the UserData section – copy and paste that into a search of TechNet for meaningful information. -
Kinect for windows sensor does not start when using remote WMI
Scenario:
I have written a software (lets call it kinectRecorder.exe) that uses "kinect for windows sensor" to record images. The machine that connects to the kinect sensor has windows 8.1 and kinect v2 installed. The software is able to successfully records
images from kinect sensor when running locally. (meaning if I hit f5 from vs2013, frames are recorded to local disk)
Due to resource constraint and other requirement, I have to remotely kickoff kinectRecorder.exe on the windows 8.1 machine from a windows 7 machine. on the windows 7 machine, I remotely kick off the kinectRecorder.exe using windows WMI infrastructure.
The credential used for windows 8.1 machine and windows 7 machine are the same under same windows domain. the credential used to authenticate in wmi is also the same, I can see the user name running kinectRecorder.exe after kinectrecorder.exe is started
remotely.
Problem:
The result is that kinectRecorder.exe starts ok, but after the kinectsensor.open call, isavailable property changed to false, meaning sensor not detected.
Question:
What's stopping kinect sensor to be detected/opened (i'm not sure what the correct jargon is here)?
I have been search the web, In msdn documentation (known issues), I cannot find the problem being mentioned. I wonder if I'm the only person who has encountered this issue before.
Any pointer is hugely appreciated.Kinect is not supported within the context of a service because of the underlying need for a user session, see
https://social.msdn.microsoft.com/Forums/en-US/72cecf8b-ac64-47e2-b54b-ddbd1dc237c9/calling-kinect-sdk-apis-from-a-windows-service-is-not-possiblesupported?forum=kinectv2sdk
Can determine that the system has at least one logged in user and can you launch the application within that users session? KinectMontior/KinectService must be running for the runtime to get any data from the sensor. If you use Remote
Desktop to log into that user session, you can confirm this works by running any of the samples and they should work without issue(remember to ensure that your audio remoting is left on the server, see troubleshooting guide
https://social.msdn.microsoft.com/Forums/en-US/20dbadae-dcee-406a-b66f-a182d76cea3b/troubleshooting-and-common-issues-guide?forum=kinectv2sdk).
Carmine Sirignano - MSFT -
New CIM cmdlets unable to do as much as WMI cmdlets?
I'm using the new CIM cmdlets released in PS3, but there are a few things I don't seem to be able to do with CIM that I was able to do with the deprecated WMI cmdlets.
Here is an example:
([wmiclass] 'Win32_Process').Properties['WriteTransferCount'].Qualifiers.Remove('read')
This will retrieve the WMI class Win32_Process, get the property WriteTransferCount and remove the qualifier 'read' from it using the Remove() method.
Using CIM?
(Get-CimClass Win32_Process).CimClassProperties['WriteTransferCount'].Qualifiers
So far so good, this works so far. Now let's invoke the Remove() method as above:
(Get-CimClass Win32_Process).CimClassProperties['WriteTransferCount'].Qualifiers.Remove('Read')
<#
Method invocation failed because [Microsoft.Management.Infrastructure.Internal.Data.CimQualifierOfProperty] does not contain a method named 'Remove'.
At line:1 char:1
+ (Get-CimClass Win32_Process).CimClassProperties['WriteTransferCount'] ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound
#>
Right, of course it doesn't, because CIM classes don't expose methods. You need to use Invoke-CimMethod
But... reading through the help of Invoke-CimMethod, one notices that it accepts either a CimClass object, or a CimInstance object.
Unfortunately, our object is of type CimQualifierOfProperty, so Invoke-CimMethod refuses to accept it.
I can't find any way of making this work. I looked up the classes in MSDN, spent over 1h searching the internet, no one seems to be using this class yet (other than PowerShell) and there doesn't appear to be a way to do this using the new Cim objects (notice
I said objects and not cmdlets, I'm fine going into .NET territory, but still can't find a way of doing it).
Is it me or can't this be done at all?Hi AnnaWY, thank you for the reply.
There are a couple of reasons why after doing a Qualifiers.Remove() you still see the object as present
1) Since the property qualifiers define how a property behaves, which in turn defines how the class behaves, you cannot run this method on classes with instances. To be more specific, you can run the method (you just did) but when you try to set it it will
fail.
2) Whenever you work with WMI objects you're dealing with an in-memory instance of the object, so at the end of the process you need to call the Put() method to save it back into WMI. Obviously I did not show this on my example as I don't want people breaking
their computers :)
As for the method Remove() not appearing in the Get-Member cmdlet, this is expected. The object returned is of type System.Management.QualifierData. If you look at the MSDN class definition, you'll notice that the
class does not expose a Remove() method - https://msdn.microsoft.com/en-us/library/system.management.qualifierdata%28v=vs.110%29.aspx.
This is expected. However, the underlying object does.
This is the same for the Put() method for example, it is not seen as a method because the class definition does not define it, but the methods can still be called. However, if you're using intellisense and you type the beginning of the name of the method,
Remove() in this case, intellisense will pick it up and even tell you what the method expects to be given as a parameter.
In anything PowerShell if you try to call a non-existent method you will get an error saying that the method does not exist, try misspelling Remove() and you'll see it. The method definitely exists, it's just not directly exposed as a class method.
I had already read the blog you linked to, but as I mentioned on my original post it only explains how to run methods on CimClasses and CimInstances, whereas this is a CimQualifierOfProperty object.
I looked at the underlying .NET API in the MI namespace and tried to do this in C# but I still can't find a way of removing anything other than either classes or instances of CIM objects. I believe this to be a bug in the new Cim classes... -
R12 PO Distribution updates when no API
I have a client that wants to electronically make changes to PO Distributions, such as 'Project' and 'Task' fields (project_id, task_id). No API exists for this, and direct database updates are not desired, nor recommended. Are there any options to do this? Possibly validate and make direct database updates, then initiate the PO Approval process? Or maybe create a new PO version that is electronically submitted for approval? Or maybe something else? Please...all suggestions gratefully accepted.
Thanks.
RonHi,
Please try to rebuil the WMI repository.
For detailed information, please refer to the blog below,
http://blogs.technet.com/b/askperf/archive/2009/04/13/wmi-rebuilding-the-wmi-repository.aspx
If issue persists, due to sfc doesn't work, could you try to repair your system with the installation disk?
Best Regards.
Steven Lee
TechNet Community Support -
Hyper-V WMI Provider - Searching and Setting Port Mirroring
Is there any way to search for VMs with Port Mirroring disabled through WMI provider?? I'm working on a little application to set port mirroring to destination but I can't find anything in WMI Provider API. I know this can be achieved using PowerShell
cmdlets but I would rather use WMI and C# if possible. Thanks.Hi PerlFanatic ,
Please refer to following command :
Get-WmiObject -Namespace root\virtualization\v2 -Class msvm_ethernetswitchportsecuritysetting
data
Best Regards
Elton JI
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
I am trying to use WMI to access the information of the hardware on RD640, just like the way Easy Manage does. Is it possible? If so if there any WMI information( namespace/classes/properties) that is availble? Or if WMI is not supported then is there other propertariy API? How does Easy manage access the statues and information of the hardware of RD640? Thanksbkao
Hello bkao,
Unfortunately using WMI is not a supported method. You can however use IPMI calls to get information. I believe this is how Easy mange gathers the information (by using IPMI calls). -
Unable to capture user comments and responder in RESPOND API
We are building a custom application that uses Oracle Workflow underneath. The application users and responsibilities have been integrated into Workflow. Notifications are acknowledged and responded to directly from the application using the PL/SQL Notification APIs.
When using the wf_notification.respond API with the appropriate user and comment information filled in, we are still unable to capture the responder information as well as the reponders comments. In other words, the RESPONDER and USER_COMMENT fields in the WF_NOTIFICATION is blank. However, the response does seem to go through otherwise. Do we need to set some kind of user context outside of just setting the response attributes and calling the respond API? Following is the code....
owf_mgr.wf_notification.setattrtext(p_nid,
'RESULT' ,
'APPROVED');
-- This procedure then caused the WF to advance to next step
-- Respond to notification, depends on RESULT setattrtext above
owf_mgr.wf_notification.respond( p_nid, -- notification id
p_respond_comment, -- response_comment
p_responder ); --responder role
Any help is greatly appreciated.
Thanks,
RajIf you are on 11.5.10 or greater or standalone 2.6.4 if you pass the responder value to wf_notification.respond API it should be updated in wf_notifications.responder column. The comments is now updated in wf_comments table against the notification id and not wf_notifications.user_comment column.
Thanks, Vijay -
Hi,
We are getting below errors in /nwa/logs. We have our PI (7.11) and Service Registry configured on the same server. And have out CE (7.2) system connected to this service registry. Does any one has similar experience? Please let me know if you have any solution for the same.
SR Log Error
| 11-Nov-11 14:10:45.568
| Method : getClassificationSystems()
| Class : com.sap.esi.uddi.sr.api.ws.ServicesRegistrySiImplBean
| ThreadID : 146
| Message : com.sap.esi.uddi.sr.api.exceptions.SRException: No classification system found for ID 'QName: Namespace= http://uddi.sap.com/classification; Name= ConfigurationFlags'
|
| com.sap.esi.uddi.sr.impl.common.Utility.cs2srException(Utility.java:122)
| com.sap.esi.uddi.sr.impl.ejb.ServicesRegistryBean.getClassificationSystems(ServicesRegistryBean.java:242)
| sun.reflect.GeneratedMethodAccessor1325.invoke(Unknown Source)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
| com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
| $Proxy1087.getClassificationSystems(Unknown Source)
| com.sap.esi.uddi.sr.api.ws.ServicesRegistrySiImplBean.getClassificationSystems(ServicesRegistrySiImplBean.java:456)
| sun.reflect.GeneratedMethodAccessor1324.invoke(Unknown Source)
| sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| java.lang.reflect.Method.invoke(Method.java:585)
| com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_WS.invoke(Interceptors_WS.java:31)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
| com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
| com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
| com.sap.engine.services.ejb3.webservice.impl.DefaultImplementationContainer.invokeMethod(DefaultImplementationContainer.java:203)
| com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process0(RuntimeProcessingEnvironment.java:512)
| com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.preProcess(RuntimeProcessingEnvironment.java:486)
| com.sap.engine.services.webservices.espbase.server.runtime.RuntimeProcessingEnvironment.process(RuntimeProcessingEnvironment.java:256)
| com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWOLogging(ServletDispatcherImpl.java:176)
| com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPostWithLogging(ServletDispatcherImpl.java:112)
| com.sap.engine.services.webservices.runtime.servlet.ServletDispatcherImpl.doPost(ServletDispatcherImpl.java:70)
| SoapServlet.doPost(SoapServlet.java:51)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
| com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:140)
| com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:37)
| com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:486)
| com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:298)
| com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:396)
| com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:385)
| com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:48)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:84)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:245)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:78)
| com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
| com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:43)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:42)
| com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
| com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
| com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:428)
| com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:247)
| com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:45)
| com.sap.engine.core.thread.execution.Executable.run(Executable.java:115)
| com.sap.engine.core.thread.execution.Executable.run(Executable.java:96)
| com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314)
|Hi,
Refer Error:Service Registyr Configuration PI 7.11
and http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/8071b1b8-3c5c-2e10-e7af-8cadbc49d711?QuickLink=index&overridelayout=true
Thanks,
Chandra -
Is There any API in receivables payment will made against closed invoices ?
Hi ALL,
i have requirement as below.
i am doing AR Invoice Data Migration for Instance 11.5.5 (as a Source Instance) to the new instance R12 (as a target instance).
Both open and closed invoices will have to be migrated from 11.5.5 to R12 to provide the drill down facility for audit purpose.
To meet the above requirement all the open and closed invoice will be picked up from 11.5.5 ; and imported into R12..
Subsequently, full payment will be made in R12 against all closed invoices in 11.5.5 to close those invoices by using any APIs?
can some one explain is there any API in receivables payment will made against closed invoices.
Thanks,
VSR.Hi,
Can you be clear on your question: You want any API to make payment against closed invoices?
To me, You are making things complex. We can achieve the Migration of Closed invoices using following two procedures:
Procedure: 1
Ask Functional Guy to create a Transaction Type 'Closed Invoices' with Open to Receivables Flag not checked. +(You can uncheck Post to GL flag also, if required depending on your migration strategy)+. Status at Transaction Type if taken as 'Closed' it will be appropriate.
Invoices migrated using this Transaction Type shall not be shown as Outstanding but will be useful for Audit.
Procedure: 2
Consider the amount due Original of Closed Invoices and migrate them with the amount as Amount due remaining.
While migrating populate Receipt Method,Payment Method and Instruments useful for Automatic Receipts.
Once Create Automatic Receipts Program is run, it will close all these invoices. Note: We require dummy bank here which points to a Clearing account.
Automatic Receipts program is also an API.
In the above 2 ways, we are acheiving the Goal by using Functional knowledge rather than Technical. And I think following Functional way is better and less time consuming.
Please discuss with your Functional consultant if required. You can succeed.
Regards,
Sridhar
Maybe you are looking for
-
SFTP adapter - missing maverick java classes
Hi We have using the BPEL PM Developer (10.1.3.1). We have tried to use the SFTP with the FTP Adapter. We configured the oc4j_ra.xml file, but after creating a sample BPEL process with the FTP adapter we got this error message in the log file: "Missi
-
Planning layout - If all KFs are Zero in Actual Cube
I have created two cubes, actuals and planning cubes. Created a planning layout in Multi planning area. In the layout settings, i have selected , select from transactional Data option. There are lot of entries in Actuals cube, for which all the Key f
-
In Opera there is a 1px line above tabs which helps in organising windows. So I can move the cursor highest on the screen, click and move the window or if I want do change window to firefox from another window i can click highest on the screen fastes
-
Hi together, I have an application which needs about 60MB memory when run with my test data on Linux. When run on Solaris it stops with about 2GB memory eaten with the error message 'no memory'. The problem disappears when libumem is used with this p
-
HT4356 app for canon mx870 wireless printer to convert to air printer
Is there an app to enable a Canon MX870 Wireless Printer to be used as an Airprinter for IPad2