|
|
|||||||
Folks, Kix provides the wonderful macro @PRODUCTTYPE. Is there something similar that I can use to get the OS of a remote machine. I have already tried $oDomain = getobject("WinNT://$sDomainName") $oDomain.filter = "computer","" For each $oComputer in $oDomain $oComputer.operatingsystem $oComputer.operatingsystemversion etc... however the return values are Windows NT 4.0 I was wanting to know whether the target machine is a server or workstation The verbage for the ".role" property suggests that it may be useful however in my environment the return value is nothing. "Role Gets and sets role of this computer (server, workstation, and so on) " Furthermore, the curious thing is that the following produces no screen output $x = "Role=" + $oComputer.role + "" ? $x The following at least outputs the text "Role=" to the screen $x = "Role=" ;+ $oComputer.role + "" ? $x What is it about some of these properties that seems to zap the contents of variables ? |
||||||||
|
|
|||||||
mmm... is there any specific reason why you don't want to use normal script like: code:to get all wintosh tree, need little bit more intelligence, but you probably get my point...$pp = ReadValue("\\machines_name_or_IP\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions","ProductType") |
||||||||
|
|
|||||||
Lonkero, The only reason that I didn't do that is that I didn't know about it !! Sensational. Thanks. There's so much in the registry that is not clear. Why do I have CurrentControlSet, CurrentControlSet001 and CurrentControlSet002 ? I also need to know what logical/physical drives exist on a machine. Can the registry provide that info ? I've looked under "Diskcontroller" and DeviceMap\Scsi but is there makes little sense to me. Is there a "Dummies Guide To The MS Registry" book available ? |
||||||||
|
|
|||||||
dummy book for reg... I think it's called power users or sys admins or something like that... but it's for dummies. currentcontrolset is what it says. currentcontrolset001 is the one before that. so when you try to load crashing machine from last working config, I think it tries to use that. 002 is older. I'm not sure, I've allways thought that they get updated on every boot. so currentcontrolset001 changes are moved on the next bootup to 002. affective things are anyway in the set without numbers about that hardware stuff, I remember more than few scripts been posted in here, so try searching on scripts forum and from http://home.wanadoo.nl/scripting/ you get some tools and bases for scripts on stable base. cheers, |
||||||||
|
|
|||||||
for drives currently available on remote machine you could use registry or: code:this works only NT/2000/XP without any tricks.break on |
||||||||
|
|
|||||||
I love my UDF... code:? wmiquery("Caption","Win32_OperatingSystem","$computername") [ 17 June 2002, 18:03: Message edited by: Radimus ] |
||||||||
|
|
|||||||
didn't even think about that! chees, if one has complete UDF, it'd be sin not to use it, right? |
||||||||
|
|
|||||||
I am starting to collect the 'essential UDF kit' my scripts are getting smaller, but my UDF lib is getting bigger. The WMIQuery() was the first one in... along with WshShortCut, XlsInputBox, ServiceRun, ServiceStartup, regwrite, FindPROC(modified killproc), Groupmembers, DelDir (once I neutered it for null input), and Ping. there are a few others, but are my lan-specific Hopefully, the IE library will get working better... |
||||||||
|
|
|||||||
Radimus, you got a web site, right ? Why don't you post some of this stuff in downloadable form, like your work-in-progress IE GUI Library, that way, we can always get the latest and greatest, instead of copy-pasting it from the board. |
||||||||
|
|
|||||||
I though about that... okey dokey... I'll do it tonight. I have some there now, but it is my office's logon script. my boss wants me to rename the names and addresses in them anyway, for security.. I can understand that |
||||||||
|
|
|||||||
I have uploaded the scripts and UDFs to http://www.wheelerfam.com/kixtart.htm |
||||||||
|
|
|||||||
Guys - thanks for the help to date Is there any answer to my second question "Furthermore, the curious thing is that the following produces no screen output $x = "Role=" + $oComputer.role + "" ? $x The following at least outputs the text "Role=" to the screen $x = "Role=" ;+ $oComputer.role + "" ? $x What is it about some of these properties that seems to zap the contents of variables " Regards Mark |
||||||||
|
|
|||||||
I have been using WMIQuery to retrieve the OS information from remote machines. It only seems to work on some machines. I thought at first that it only worked on Win2k, but it works on some NT4SP6 machines as well. It doesn't work on any of our NT 4 Terminal Servers (SP6). What are the dependencies for WMIQuery? Thanks, Michael. |
||||||||
|
|
|||||||
wmi should be only one. this means, the machine where it's run on, should have wmi installed. if not working, report to: http://81.17.37.55/board/ultimatebb.php?ubb=get_topic;f=12;t=000117 cheers, |