32 or 64 bit version of product: 64
Operating system:win 10 pro
32 or 64 bit OS: 64
I have tried to search before creating this topic, cause I am sure i missed something somewhere.
Issue - when trying to run a few basic built exe's they open with no issue but doing the actual work (getting the info) they fail on other user computers.
I build 2 gui's to get basic AD user info, one looks at emp number and the second looks at display name. It get name, title, emp#, upn, description.
I built them for practice and whiny people complaining about having to open "AD users and computers, then searching"
I have tested them on my computer and work fine. I have tested on a pc used for testing, works fine.
A few users are not able to get them to display results, just shows the loading page.
I have tried a few options to get it to work.
Try 1 - when opening the exe(built exe as powershell- v2 host windows forms for either 32 or 64b, no restrictions on os), it runs import-module activedirectory
-works on my and testing - other pc's half the people it works
Try 2 - on the form i created another button to run import-module activedirectory - (built exe as powershell- v2 host windows forms for either 32 or 64b, no restrictions on os), it runs import-module activedirectory
-works on my and testing - other pc's half the people it works
One of my questions is - for the button to import the AD module - should there be anything else with the command? Any ideas that I might be missing or didn't do correctly? I would like to have all the users that will be using the tools upgrade their powershell versions to 5 but thats another issue to deal with. Right now most are at PS version 2. Side note, testing pc is win 7(64b, ps version 2)-able to run gui's, another win 10(64b, ps version 5.1)-not able to really run gui's.
Here is the code for the form with the button
- $formGetEmpInfoFromDispla_Load={
- #TODO: Initialize Form Controls here
- #Import-Module ActiveDirectory
- }
- $buttonFind_Click={
- #TODO: Place custom script here
- $displayname = $textboxdisplayname.Text
- $labelDisplayUserInfo.Text = Get-ADUser -Filter "name -like '$displayname'" -Properties Name, SAMAccountName, Enabled, description, title, SID, UserPrincipalName, employeeID, ScriptPath, HomeDirectory | Format-List -Property Name, SAMAccountName, EmployeeID, Enabled, Description, Title, UserPrincipalName, ScriptPath, HomeDirectory, SID | Out-String
- }
- $buttonLoadADModule_Click={
- #TODO: Place custom script here
- Import-Module ActiveDirectory
- }