Search found 14132 matches

by jvierra
Thu Jul 24, 2008 5:45 am
Forum: Windows PowerShell
Topic: help with Get-Mailbox methods
Replies: 20
Views: 33446

help with Get-Mailbox methods

Try this: $alias = "some alias" # replace with valid alias Get-Mailbox -Identity $alias If you are running your code from a file or from a cut and paste tehn try just typing it inas the file may have bad chars in it. If the above test works then yuor code should work. If it doesn't then you may have...
by jvierra
Thu Jul 24, 2008 2:34 am
Forum: Windows PowerShell
Topic: help with Get-Mailbox methods
Replies: 20
Views: 33446

help with Get-Mailbox methods

The return type of "alias" is probably not a string. I would bet that it is a char array. You need to convert it. It may also be unicode and may need to be converted. Much of this would depend on teh installation of you remail system. Use "GM" on "$table[0]" to check object types.
by jvierra
Wed Jul 23, 2008 3:32 am
Forum: VBScript
Topic: Hiding cscript window
Replies: 4
Views: 2242

Hiding cscript window

The sad answer is no. This has been done, I believe, to prevent rogue scripts.
by jvierra
Tue Jul 22, 2008 2:11 pm
Forum: VBScript
Topic: Add more than one record to a database
Replies: 2
Views: 613

Add more than one record to a database

Just change the value of "strComputer" to the name of the other computer.

You could also read computer names from a file, a spredsheet or from Active Directory.
by jvierra
Tue Jul 22, 2008 5:06 am
Forum: Windows PowerShell
Topic: Copy-Item E:\Path -recurse -force
Replies: 10
Views: 14844

Copy-Item E:\Path -recurse -force

Note also - On WS2003 SP1 and later files that are copied or moved from an "unsafe" network location cannot be copied or moved to some local locations without first removing the "block" flag. THis is normally done by using Explorer to view the properties of the file and unchecking "unblock" (Advance...
by jvierra
Tue Jul 22, 2008 4:52 am
Forum: Windows PowerShell
Topic: Copy-Item E:\Path -recurse -force
Replies: 10
Views: 14844

Copy-Item E:\Path -recurse -force

The following construct works correctly for all files DLL included. Copy-Item -path C:Test -destination C:Test2 -recurse -force Notice NO "" in "c:test2" so it puts contents and structure frm "c:Test" INTO c:test2. It will create "C:Test2" if it doesn't exist and over-write if it does. Jeff/Don - (F...
by jvierra
Tue Jul 22, 2008 4:38 am
Forum: Windows PowerShell
Topic: Copy-Item E:\Path -recurse -force
Replies: 10
Views: 14844

Copy-Item E:\Path -recurse -force

If you are trying to copy an ASP.NET web site you will have permissions problems if you don't have correct privileges to the site. YOu may also not be able to copy certain kinds of "vitualized" sites as they may not exist outside of the IIS server's view. This wuold be true of SharePoint sites and o...
by jvierra
Mon Jul 21, 2008 10:09 am
Forum: Windows PowerShell
Topic: connecting to Informix db
Replies: 12
Views: 9379

connecting to Informix db

ADO.NET connections are closed when the object is destroyed. The variables are declared in teh scope of the function so they will go "out-of-scope" and lose all references after the function ends. This will cause the runtime to "destroy" the objects. Destoying a connection object is as good as closi...
by jvierra
Mon Jul 21, 2008 6:06 am
Forum: Windows PowerShell
Topic: connecting to Informix db
Replies: 12
Views: 9379

connecting to Informix db

Sorry I didn't see it sooner. The Informix OleDB object should work almost exactly like the SqlServer object. They both derive from teh Sybase Open Client and support most things in a nearly identical way. Too bad they don't all support the exact same SQL dialect. jvierra2008-07-21 13:07:36
by jvierra
Mon Jul 21, 2008 5:57 am
Forum: Windows PowerShell
Topic: connecting to Informix db
Replies: 12
Views: 9379

connecting to Informix db

Ok -

This is wrong:
$da = new-object System.Data.OleDb.OleDbConnection

The $da is a TableAdapter. You have changed that.

Use my posted code. The way you are doing it won't work with any database.