Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


COM Objects

 
Logged in as: Guest
arrSession:exec spGetSession 2,5,26878
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Windows PowerShell >> COM Objects
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 COM Objects - 10/11/2005 10:44:33 PM   
  Snipah


Posts: 1341
Score: 6
Joined: 11/1/2004
From: Netherlands
Status: offline
COM objects can also be created with New-Object. Not all COM objects are supported, however.  Objects based on Exchange Collaboration Data Objects (CDO) are not supported in this release. 
 
The following example creates an Internet Explorer object, navigates to http://www.msn.com/ and then makes the browser visible:

      



This script starts a calculator and sends keystrokes via the wscript.shell object

      
 

To collect the processes on a system and present them grouped by PriorityClass, type:

      
 
The following is an example of the output:





    PriorityClass : Normal
 
ProcessName    Id    VirtualMemorySize
-----------    --    -----------------
00THotkey      2520           29548544
accoca          248           19296256
...
wmiprvse       1560           21602304
wmplayer       5988           66564096
 
    PriorityClass : High
 
ProcessName    Id    VirtualMemorySize
-----------    --    -----------------
PSXSS          856            28921856
winlogon       892            60010496
Idle             0                   0
 


_____________________________

For more information, please see the "Read me First" topic.

http://www.visualbasicscript.com
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Windows PowerShell >> COM Objects Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts