Cant use Import-Module in Powershell in SQL Server 2008 SQL Agent

Yo Geeks, 

SQL 2008 SP1 CU 5 Enterprise x64
Windows Server 2008 R2 Datacenter 

Wrote a basic Powershell script to get Membership of Certains Groups from AD 
using the ActiveDirectory Module new in 2008 r2/ Windows , and insert into a 
SQL table required for some old dodgy app. Tested outside of SQL Agent - all 
fine. 

Want to use as SQL Agent Job / Powershell step.  Created a job and got 
message like "Import-Module is invalid command" 

Thought SQL might be running Powershell 1.0 , but $Host run from SQL Agent 
says 2.0

From same SQL Agent job do a "Get-Command"  and mysteriously Import-Module, 
Get-Module not listed as commands , whereas when I do in a interactive 
Powershell session (logged on as me - Local / Domain Admin) they are 

Logged on interactively / RDP'd as the SQL Agent Service account and run 
Import-Module and works fine 

SQL Agent Service Account is local Admin. 

Not a biggie as I can full back to using LDAP/ADSI Searcher thingy , and 
about 10 other ways to skin a cat, but wonder if anyone had seen this / 
expected behaviour

thanks in advance, 
Andy.


0
Utf
9/3/2010 10:07:03 AM
sqlserver.server 1327 articles. 0 followers. Follow

0 Replies
1455 Views

Similar Articles

[PageSpeed] 35

Reply:

Similar Artilces:

Cant delete any messages
Hi! My friend at work has a weird problem recently he can't delete any messages in Outlook Express the delete button doesn't work so does not the right mouse button menu delete option. When d&d the files theres a error that says "An error occurred" He works on a normal user account. Any ideas? Have your friend post in an Outlook Express newsgroup. Tell him/her to include the version of OE, the exact error message, and any other pertinent details. Outlook Express and Microsoft Outlook are not the same e-mail client, nor are they related in spite of the similarity of ...

How can I read NTbackup BKF files using VB .Net pls?
Hello, I want to write a utility to extract files from backups in BKF format created by NTBackup. Does anyone know please if there are any libraries or built-in functions to open BKF files in VB .Net? Thanks, - Alan. Hello, I have the same problem Did you find any solution ? Thanks Pascal frmsrcurl: http://msgroups.net/microsoft.public.dotnet.languages.vb/How-can-I-read-NTbackup-BKF-files-using-VB-Net-pls ...

Multiple Use of Product Key
I have recently bought a second laptop and am trying to register Microsoft Office Professional Plus 2007. I bought it as a student from my University. While trying to register on my new laptop, while also keeping my old laptop active, it says my product key is invalid. Anyone know why? Perhaps because you failed to uninstall any trial version first, or the version you purchased, Office Plus is a volume license which is not licensed for two PC's "tony777288" <tony777288@discussions.microsoft.com> wrote in message news:0EC79925-7A11-4DFD-9C2A-152EF6488A04@m...

Can Winpcap be used to IP address
Using winpcap i have actually got the adapter,time stamp,header length..etc.Is it possible to get the IP address as well.What other functionality can you induce using Winpcap.I am using VC++ to do my project. thanks in advance love JEEVAN fenn_j@rediffmail.com "jeevan" <fenn_j@eudoramail.com> wrote in message news:%23oE7Ji1vDHA.2484@TK2MSFTNGP09.phx.gbl... > Using winpcap i have actually got the adapter,time stamp,header > length..etc.Is it possible to get the IP address as well.What other > functionality can you induce using Winpcap.I am using VC++ to do my project...

Displaying jpegs from SQL Server in a report
Hi, I'm trying to displaying images stored in SQL Server 2000 into a Crystal Report 10. The images source is a jpeg, and the image is not displaying. If I upload a bmp file in the database, it displays properly. The data type is a varbinary. Any idea how to display the image which was uploaded from a jpeg? ...

I am trying to print on legal size paper, i cant set size.
I've tried print option to set up 8.5 x 14 paper put it wont hold the setting. Well, it is to do with your printer driver. Are you sure that the printer supports that paper size? Perhaps you can see if there is an updated driver for the printer. Hope this helps. Pete On Dec 14, 2:26=A0pm, Michele <Mich...@discussions.microsoft.com> wrote: > I've tried print option to set up 8.5 x 14 paper put it wont hold the > setting. =A0 ...

cant open file
I have windows vista and microsoft publisher 2007 did my website and now out of nowhere it says cant open file tried everything and is not happening What kind of file are you trying to open? What steps are you taking? What kind of error messages are you getting? Details are important. -- JoAnn Paules MVP Microsoft [Publisher] Tech Editor for "Microsoft Publisher 2007 For Dummies" "arleen" <arleen@discussions.microsoft.com> wrote in message news:B264DC25-1072-4931-B44C-7F481A13DBEE@microsoft.com... >I have windows vista and microsoft publisher 2007 did my w...

How do I save a workbook as a new workbook by using macros?
I want to save my workbook as a new workbook with the name from cell b3 and cell b2 in the folder c:\my spreadsheets. In addition I want Excel to alert me if there is nothing in these cells. The workbook has two sheets called "fordeling" and "statistikk" and it is the cells in "fordeling" I want to use as the filename. The last thing is that I dont want the new workbook to get cell values from the original document when opening both of them and vice versa. Is this possible? Thanx in advance Hi, If I understand correctly: you want to create a new file whi...

creating setup of vc++ aplication using a installshield
how to create a setup of the vc++ application using a install shield my application have two Dll files which are imported in the main application and a .exe which is required to be included so please give em some idea if u have 1. Try Installshield from http://www.installshield.com/ ( You may have to buy the product ) 2. Use any open source installation wizards, there are atleast 5-10 projects available in the net ( You may have to cutomize them to suite your needs ) "kapil mehta" <anonymous@discussions.microsoft.com> wrote in message news:15590BAD-E80A-4D6C-A8F4-EE98DBEEC...

Cant get Money to work
when I try to use monwy to set up new account, all I get is "The list is temporarily unavailable. Please try again later." This is the second night in a row that it has done this. Did I buy something that does not work???? In microsoft.public.money, Roaddog_tnkr wrote: >when I try to use monwy to set up new account, all I get is "The list is >temporarily unavailable. Please try again later." This is the second night >in a row that it has done this. Did I buy something that does not work???? What did you buy? What are you trying to install it on? On De...

Having trouble using 'find'
After a user's mailbox is moved from Exchange 2000 to Exchange 2003, he can no longer do use the find feature. As a test, we try to do a 'find' for emails in his inbox from someone we know he has a lot of them in his inbox. The find finished in like one second and show nothing. Please help. Kit ...

Using Outlook to access groupwise
I am trying to set up outlook to access email on a Novell Groupwise Webmail system. I am not sure what I am doing incorrectly, but I am getting the following errors: * Send test e-mail message: The specified server was found, but there was no response from the server. Please verify that the port and SSL information is correct. * Long onto incoming mail server (POP3): The specified server was found, but there was no response from the server. Please verify that the port and SSL information is correct. It seems to have found both the incoming and outgoing mail servers just fine. Wh...

Using Background Pictures for Forms
Hello can anyone tell me any web sites where I can find background pictures to use them in my access forms ? ...

Importing a .txt and exporting it again.
I've got a .txt file that I need to sort before uploading into an accounting system. I open it with excel and all data is in Col A. Then I seperate it out into it relevant fileds using data, text to columns. It isolates the data I need to sort by perfectly. Then i sort it. Here is my prob. When i save the file again as a .txt there have been tabs added to it. I think this will casue problems to my upload. I've tried saving as ms-dos txt, tab-delimted txt..., but to no avail. has anyone any ideas on what i can do? I'm open to approaching the problem in a completely different ma...

Importing Attendance Transactions
We have this process where, once a month, we import roughly 3000 attendance records into Great Plains through the table import function from another system. Apparently, GP (our version is 7.5) uses the entry screen as the intermediary when importing these records most likely for validation reasons. At the end of the import, all of these entry screens still exist and must be manually cleared. During the clearing of the screens, we get validation errors that, although they do are not critical, throw up messages causing us to be unable to use macros to clear all the transactions. We...

How do I use a Parameter to fill a text box on a Report in Access 2007?
Hi there, I have an Access 2007 project (.adp) which is used for many different projects. There is a report that is generated for these different projects, which I need the following information to change when the report is run: 1) Project Name 2) Document Status (version) This information is usually entered onto the report in Design View but I would like the user to simply type in this information in a Parameter window which pops up before the report is run. Thus preventing the user from having to view the report in design view at all. Is this possible and how would I go about it? I have de...

from exchange machine i cant telnet to 25
all machine on customer lan are connecting to exchange server to post mail. when logged into the exchange server i launch cmd prompt and "telnet 192.168.0.10 25" and cant connect to smtp service (i.e from machine that host SMTP so network routing not involved) - netstat -na shows me port 25 is listening - simple mail transfer protocol is running as a service - sending mail via outlook on this server works and also show me a log on my exchange server that it coming from this servers public ip - default smtp virtual server, outbound security set at ANON. - default smtp virtua...

I cant send mail in Outlook
I have just installed outlook 2007 and have got a new email address, although I receive emails, I cant send any. The following message comes up in an email that says "Stystem Administrator" Message undeliverable, then the text says : Your message did not reach some or all of the intended recipients. Subject: Sent: 21/05/2008 20:04 The following recipient(s) cannot be reached: '************@Hotmail.com' on 21/05/2008 20:04 550 5.7.1 <***********@Hotmail.com>... Relaying denied. Proper authentication required. > I have just insta...

how can you find fonts that are used in publisher
I'm Using Publisher 2000. When I open my publisher document, I get a message box- Load font showing me the fonts that are embedded in my publication or are unavailable. I looked over the thing. I can't find this font. It prints fine, the system subs the font but I would to be able to find this to get ride of this annoying box. Is there some tool for this? There is a button on the inquiry dialogue labeled "Font Substitution", in the next dialogue you have the option of permanently substituting the font. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer....

Using Money95 data with Money2004
I have installed a trial version of 2004 on a new XP system. I have copied "My Money" file from the Money95 system (running windows ME) to the new system. Money 2004 will open the file, recognizes that it is an older version... converts it to 2004 and appears to open without a problem. But, there are no accounts shown, no payees, reports, etc. Any suggestions? never mind. I tried again and it looks like the 95 data converted. >-----Original Message----- >I have installed a trial version of 2004 on a new XP >system. I have copied "My Money" file from ...

Combining Extender View & SQL Tables in Smartlist Builder
I'm trying to develop a SmartList that combines open purchase orders from GP 9.0 and open purchase requisitions from Paramount Workplace. I've created an Extender View to retrieve the PO info from GP and linked the PR detail table (SQL) from Paramount to it to grab the PR data. When I try to run the SmartList, I get an error "The SmartList contains an object that does not exist in this database". The Paramount table I've linked is part of the GP database I've built the SmartList in. Any ideas what I need to do differently? Thank you, Frank Hamelly NOVA Solutions,...

SQL MAX Function in CRM Web Service
Are there any way to write a sql senteces like this: select MAX(price) from product where productid = <any product id> using the CRM Web Service? Thanks Enrique ...

Tutorial or sample code using CAsyncSocket
Hello! I need to create an client application (MFC) that will connect to an Linux Server. Is there a tutorial or sample that uses CAsyncSocket to do this? // Anders -- English is not my first, or second, language so anything strange, or insulting, is due to the translation. Please correct me so I may learn better English! "Anders Eriksson" <andis59@gmail.com> wrote in message news:ebokhjvz6isn.dlg@ostling.com... > Hello! > > I need to create an client application (MFC) that will connect to an Linux > Server. > > Is there a tutorial or sample that uses C...

why cant i change font
i select all the text in a textbox and try to apply a font. nothing happens. that's the case with 4/5 fonts, only a few work. the same appears in both publisher 2003 and 2007. Are you creating a web page? Publisher will show 11 or so fonts when you are creating web pages. To use all the fonts, on the toolbar, Format, Font, uncheck Show only Web fonts. If above is not the issue, are you getting an error? -- Mary Sauer MVP http://msauer.mvps.org/ "ayudameconpublisher" <ayudameconpublisher@discussions.microsoft.com> wrote in message news:1BE1262A-A70B-4...

Use checkboxes with linked external data?
I have a number of columns for which I want to use a checkbox for each row. The problem is, since I'm using external data, the number of rows in the sheet will vary based on the query I'm using. The "Fill down formulas..." option in the Data Range Properties doesn't seem to have an effect on the checkbox behavior. Is there any way to make the Cell Link in the check box properties dynamic? Is there a way to make the checkbox behave like a formula? i.e. When my query returns 4 rows, I get 4 checkboxes linked to the appropriate cell. When I have 15 rows, I get 15 ch...