Search found 252 matches

by mqh77777
Thu Oct 18, 2018 10:16 am
Forum: PowerShell GUIs
Topic: Click button and search AD
Replies: 12
Views: 4134

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 mqh77777
Tue Oct 16, 2018 12:44 pm
Forum: PowerShell GUIs
Topic: desktop shortcuts
Replies: 8
Views: 2524

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 mqh77777
Tue Oct 16, 2018 8:42 am
Forum: PowerShell GUIs
Topic: desktop shortcuts
Replies: 8
Views: 2524

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$\User...
by mqh77777
Tue Oct 16, 2018 8:28 am
Forum: PowerShell GUIs
Topic: desktop shortcuts
Replies: 8
Views: 2524

Re: desktop shortcuts

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

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...
by mqh77777
Tue Oct 09, 2018 10:32 am
Forum: PowerShell GUIs
Topic: how to stop code but keep form open?
Replies: 2
Views: 1393

how to stop code but keep form open?

PowerShell Studio 2018 v5.5.153 OS is windows 10 x64 We have a form that has a pcname text box. you can enter a machine name and then press any number of buttons to get and do stuff. But if the tech did not enter a name in the pcname text but I want a message to display in the richtextbox. I wrote t...
by mqh77777
Wed Oct 03, 2018 2:44 pm
Forum: PowerShell GUIs
Topic: Invoke-Command not running as expected
Replies: 3
Views: 1515

Re: Invoke-Command not running as expected

Thanks I will try out your code. and I should have mentioned that Write-Log is a Function that is inside of our PowerShell stuido script. I got this from Microsoft Script Center. function Write-Log { [CmdletBinding()] Param ( [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true)] [Valid...
by mqh77777
Wed Oct 03, 2018 1:50 pm
Forum: PowerShell GUIs
Topic: Invoke-Command not running as expected
Replies: 3
Views: 1515

Invoke-Command not running as expected

We are using Powershell Studio and using that we have created a tool. This tool has many buttons. One of those buttons will tell you if certain apps are installed on a remote machine. Invoke-Command -ComputerName $PCNameBox.Text -scriptblock { if (Test-Path "c:\program files\snare\SnareCore.exe...
by mqh77777
Tue Sep 11, 2018 8:37 am
Forum: PowerShell Studio
Topic: Function not running within Form
Replies: 4
Views: 2246

Re: Function not running within Form

There are no errors in this script, run it, it works perfect. If you run this by itself it returns C:\Windows (Get-ChildItem env:Windir).value
by mqh77777
Tue Sep 11, 2018 8:22 am
Forum: PowerShell Studio
Topic: Function not running within Form
Replies: 4
Views: 2246

Function not running within Form

PowerShell Studio 2018 v5.5.153 OS: Windows 10 x64 I have a PowerShell Studio form that is compiled into an .EXE. I wanted to add a write-log function so I can log certain things when they are clicked on. This function works fine with its run from or called by .ps1 files. But when I place this insid...