Search found 237 matches

by mqh777
Fri Oct 26, 2018 7:05 am
Forum: PowerShell GUIs
Topic: Click button and search AD
Replies: 12
Views: 1504

Re: Click button and search AD

Does anyone know how to properly format the output for this? Thank you.
by mqh777
Thu Oct 25, 2018 7:56 am
Forum: PowerShell GUIs
Topic: enable psremoting
Replies: 2
Views: 705

enable psremoting

I have .cmd file that contains the following commands. %~dp0psexec \\machine -u acme\adminuser -p p@ssw0rd -h -d powershell.exe "enable-psremoting -force" I can run this from a CMD window and it works on any remote Windows 7 workstation. Within PowerShell Studio this command works. Start-Process -Fi...
by mqh777
Tue Oct 23, 2018 7:13 am
Forum: PowerShell GUIs
Topic: Click button and search AD
Replies: 12
Views: 1504

Re: Click button and search AD

The first line in your code produces the red exclamation point and does not execute. Here is my code: $buttonSCCMAppGroups_Click = { $SCCMAppGroups = (Get-ADGroup -Filter { name -like "SCCMApp_*" }).name | Sort-Object $ListSCCMGroups.Items.Add("$SCCMAppGroups") } This returns the data but it is a 1/...
by mqh777
Fri Oct 19, 2018 1:47 pm
Forum: PowerShell GUIs
Topic: Click button and search AD
Replies: 12
Views: 1504

Re: Click button and search AD

ok, we're making progress. I have a listbox and 1 button. the button will query AD and get a list of groups. It then displays the groups in the listbox. The only problem is they are not listed 'one per line'. They are only 1/2 wide and all jumbled. How do you format the listbox so it looks like this...
by mqh777
Fri Oct 19, 2018 10:19 am
Forum: PowerShell GUIs
Topic: Click button and search AD
Replies: 12
Views: 1504

Re: Click button and search AD

Yes, that part is easy. I can get the groups and display them in the Richtext window. But then you have to copy/paste the group name into another textbox and then click yet another button. I want to click 1 button that does everything. Or is that not possible?
by mqh777
Thu Oct 18, 2018 10:16 am
Forum: PowerShell GUIs
Topic: Click button and search AD
Replies: 12
Views: 1504

Click button and search AD

Product: PowerShell Studio 2018 (64 Bit) Build: v5.5.155 OS: Windows 10 Enterprise (64 Bit) Build: v10.0.16299.0 We have a PowerShell Studio form that has many tabs and over 50 buttons. We want to keep users out of active directory so I want to add a button that when pressed will search for AD group...
by mqh777
Tue Oct 16, 2018 12:44 pm
Forum: PowerShell GUIs
Topic: desktop shortcuts
Replies: 8
Views: 826

Re: desktop shortcuts

Hi, you wrote:
Did you forget to assign a computer name to "$computer"? Yes it does have a value. This is part of a PowerShell Studio form.
Did you forget to use "expression evaluator" on the control property? - Yes I don't see it. what is the expression evaluator?
by mqh777
Tue Oct 16, 2018 8:42 am
Forum: PowerShell GUIs
Topic: desktop shortcuts
Replies: 8
Views: 826

Re: desktop shortcuts

I have tried both: $UserDesktop = (Get-ChildItem -Path "\\$computer\C$\Users\$($GetUserName.Text)\Desktop").name | Sort-Object $PublicDesktop = (Get-ChildItem -Path '\\$computer\C$\Users\Public\Desktop').name | Sort-Object $UserDesktop = (Get-ChildItem -Path "\\$PCNameBox.Text\C$\Users\$($GetUserNam...
by mqh777
Tue Oct 16, 2018 8:28 am
Forum: PowerShell GUIs
Topic: desktop shortcuts
Replies: 8
Views: 826

Re: desktop shortcuts

I had tried using \\C$ and that returns nothing. No user or public shortcuts get returned.
by mqh777
Tue Oct 16, 2018 8:13 am
Forum: PowerShell GUIs
Topic: desktop shortcuts
Replies: 8
Views: 826

desktop shortcuts

We need to get desktop shortcuts on remote systems. The code below works for the Public desktop but not for the users desktop. But if I run this in PowerShell ISE then it works for both. What did I do wrong? $buttonGetDesktopShortcuts_Click = { $statusbar1.text = 'Find desktop shortcuts, please wait...