Search found 237 matches

by mqh777
Tue Oct 09, 2018 10:32 am
Forum: PowerShell GUIs
Topic: how to stop code but keep form open?
Replies: 2
Views: 546

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 mqh777
Wed Oct 03, 2018 2:44 pm
Forum: PowerShell GUIs
Topic: Invoke-Command not running as expected
Replies: 3
Views: 648

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 mqh777
Wed Oct 03, 2018 1:50 pm
Forum: PowerShell GUIs
Topic: Invoke-Command not running as expected
Replies: 3
Views: 648

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 mqh777
Tue Sep 11, 2018 8:37 am
Forum: PowerShell Studio
Topic: Function not running within Form
Replies: 4
Views: 1377

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 mqh777
Tue Sep 11, 2018 8:22 am
Forum: PowerShell Studio
Topic: Function not running within Form
Replies: 4
Views: 1377

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...
by mqh777
Wed Sep 05, 2018 7:47 am
Forum: PowerShell Studio
Topic: alternate creds not working
Replies: 3
Views: 1050

Re: alternate creds not working

it is early and I have not had my coffee and I missed that :-( thanks~!
by mqh777
Wed Sep 05, 2018 7:00 am
Forum: PowerShell Studio
Topic: alternate creds not working
Replies: 3
Views: 1050

alternate creds not working

PowerShell Studio 2018 v5.5.153 OS Windows 10 x64 I've created a form that does the following $form1_Load={ $description = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\SYSTEM\Acme\Deploy' -Name Description).Description [i] # YES, the description key in the registry has a value[/i] $GETPCNam...
by mqh777
Fri Aug 24, 2018 7:13 am
Forum: PowerShell Studio
Topic: No Results from AD Query
Replies: 5
Views: 1298

Re: No Results from AD Query

Fixed !!!! $Results1 = Get-ADComputer -Filter { name -like $Value } -Properties * | Select-Object Name, LastLogonDate | Out-String
by mqh777
Fri Aug 24, 2018 7:05 am
Forum: PowerShell Studio
Topic: No Results from AD Query
Replies: 5
Views: 1298

Re: No Results from AD Query

Yes, I am running this as Administrator. What is funny is this: In ISE if I search for HVP it returns 3 computers that have HVP in their name. But when run from PowerShell Studio it returns nothing when I enter HVP. if I enter the full name of a machine then it does return that 1 machine. How do I m...
by mqh777
Fri Aug 24, 2018 6:48 am
Forum: PowerShell Studio
Topic: No Results from AD Query
Replies: 5
Views: 1298

Re: No Results from AD Query

Yes, I've tried Append.Text on my output and that too returns no results.