Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

Access COM enumerations .. How ?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 05-28-2007   #1 (permalink)
dm_14
Guest


 

Access COM enumerations .. How ?

example:
SQLDMO.SQLDMO_WEEKDAY_TYPE.SQLDMOWeek_EveryDay

How do I use that in a Powershell script ?
[SQLDMO]::SQLDMO_WEEKDAY_TYPE.SQLDMOWeek_EveryDay
It doesn't like this.

Any suggestions ?

My System SpecsSystem Spec
Old 05-28-2007   #2 (permalink)
ClaudioG64
Guest


 

Re: Access COM enumerations .. How ?

On May 28, 7:25 am, dm_14 <d...@discussions.microsoft.com> wrote:
> example:
> SQLDMO.SQLDMO_WEEKDAY_TYPE.SQLDMOWeek_EveryDay
>
> How do I use that in a Powershell script ?
> [SQLDMO]::SQLDMO_WEEKDAY_TYPE.SQLDMOWeek_EveryDay
> It doesn't like this.
>
> Any suggestions ?


Hello,
probably you should look into SMO instead of DMO. AFAIK DMO is
considered "legacy", SMO is the way to go now


#Load the Assembly
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SqlEnum')

#Retrieve values for the enum
[Microsoft.SqlServer.Management.Smo.Agent.WeekDays]::EveryDay

Ciao,
Claudio

http://www.pulsarit.net/cs/blogs/claudiog/

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing .NET Enumerations? SeanInSeattle PowerShell 2 08-29-2008 01:59 PM
Give network access without giving access to the computer itself? Doc_Phoenix Vista networking & sharing 2 06-30-2008 06:35 PM
When standard users access Vista registry remotely, Access Denied Gayle Vista account administration 1 10-10-2007 11:48 AM
Access File Mistakenly typed as a Access Shortcut Q Vista installation & setup 7 07-04-2007 08:21 AM
Access is denied message when trying to access a remote printer MarkC Vista print fax & scan 1 03-08-2007 07:34 PM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51