Sonstiges > Infrastruktur
Benutzer und Kennwort bei WMI-Abfrage übergeben
Lloyd:
Server 7.0.3
Clients 7.0.3
---------------
Hallo,
kann ich bei einer WMI-Abfrage via Notes Script Benutzernamen und Kennwort mitgeben. Ich möchte diverse Geräte abfragen, die zwar im Netzwerk hängen, nicht aber in der Domäne und wo ich nicht als lokaler User angelegt bin. Ich hatte mir vorgestellt, dass ich einen Dummy-User auf diesen Maschinen anlege wo sich das Kennwort nicht ändert und diesen in meinem Script übergebe. Habe ich auf diesen Geräte kein lokales Konto, kann ich auch keine WMI-Abfragen machen. Oder hat jemand eine andere Idee?
Ausschnitt meines bisherigen Scripts:
Set objReg = GetObject("winmgmts://" & strComputer & "/root/default:StdRegProv")
objReg.EnumKey HKLM, strKey, arrSubkeys
Lloyd:
Hmm,
mir ist etwas rätselhaft, warum "koehlerbv" diesen Beitrag hierher verschoben hat. Ich hätte diesen Beitrag ja in der Rubrik für Notes Entwicklung gelassen.
Kann mir hier jemand weiterhelfen, oder kann der Moderator diesen Beitrag wieder in die Rubrik Notes 7 Entwicklung schieben?
koehlerbv:
Was hat das mit Notes zu tun? Du nutzt WMI unter Notes, aber Dein Problem liegt doch eindeutig "auf der anderen Seite".
Bernhard
Lloyd:
Hi Bernhard,
mein Problem liegt in Notes. Ich suche eine Möglichkeit in meinem Notes Script einen Benutzernamen und ein Kennwort für die WMI-Abfrage der Remotesysteme mitzugeben.
Gruß
Lloyd
m3:
Das ist IMHO kein Notes-Problem, sondern ein Windows/WMI Problem:
--- Zitat ---The WMI moniker "winmgmts:" enables you use just one line of code to concisely describe a WMI object or collection of WMI objects to manage. However, with power comes the difficulty of constructing complex WMI moniker strings. The following sections of this chapter decipher the components you can use to construct WMI monikers and look at some best practices for writing WMI scripts that use WMI monikers.
...
The second, and typically optional, part of WMI monikers is the security settings component. The security settings component has been a source of confusion for many system administrators. This is primarily because of the impersonationLevel setting, which behaves differently depending on the version of WMI installed on a target computer.
The optional security settings component lets you specify several different security settings that are used to connect to and communicate with WMI.
--- Ende Zitat ---
http://www.microsoft.com/technet/scriptcenter/guide/sas_wmi_jgfx.mspx?mfr=true
Wobei zu beachten wäre:
--- Zitat ---Granting privileges within a script does not confer those privileges upon the user. For example, suppose you try to run a script that includes the Shutdown privilege. If you do not already have the Shutdown privilege, the script will fail; as is always the case with WMI, you are not allowed to use a script to carry out a task that you would otherwise not be able to perform. To carry out a task that requires a privilege such as Shutdown or Backup, two things must be true:
• The script must specify the privilege in the connection string.
• You must already possess the privilege.
--- Ende Zitat ---
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln