VMware Cloud Community
f-seal
Contributor
Contributor

PowerCLI script runs on my workstation but not on a server.

I have a script created by Alan Renouf that discovers who and when a VM was created. (Excellent script btw.. http://communities.vmware.com/docs/DOC-12193 ) I have been testing this on my laptop and it runs fine. If I move the script to a server os and install all prereqs, it runs but does not find any on the data. In other words, it will list each VM name but not the Active Directory username or the date the VM was made.

I am running the script under my domain account in both cases. I have access to vCenter and read/write access to AD. At first I thought it was related to security in Server 2008 R2. (I did change the execution policy) But running it on 2003 had the same results.

Since the script can see the VM names and will write "Unknown" to the notes of a VM I don't think it is related to security within vCenter. I am using my account to login and run the script I wouldn't think AD permissions would be the issue either since only Read is really needed. And like I said, it works fine on my laptop. Its just slow and I ultimately want to schedule this to run once a week or so. Since I'm just starting to get my feet wet in PowerCLI & Powershell maybe there is something specific within there that I'm missing.

Can anyone enlighten this dimwit?

Thanks

0 Kudos
3 Replies
LucD
Leadership
Leadership

Did you install the Quest snapin for AD ?

And does it work correctly ? In other words do you get any data back from the AD cmdlets ?

Load the snapin and do for example a Get-QADUser

Add-PSSnapin Quest.ActiveRoles.ADManagement

Get-QADUser


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
f-seal
Contributor
Contributor

Yes. I did install the Quest snapin. I have not searched for more info on these cmdlets yet so I have not done testing on this single piece yet.

Until I find out more about those cmdlets I'm not sure how to test them. Got any suggestions?

0 Kudos
f-seal
Contributor
Contributor

OOps.. Your example didnt show up on my phone when I responded. I will give that a try and post my results.

0 Kudos