Search found 237 matches

by mqh777
Fri Aug 24, 2018 6:46 am
Forum: PowerShell Studio
Topic: No Results from AD Query
Replies: 5
Views: 1376

No Results from AD Query

PowerShell Studio 2018 v5.5.153 32 or 64 bit version of product: 64 Operating system: Win 10 32 or 64 bit OS: 64 From within PowerShell ISE the following code works. $GetName = Read-Host "Enter a serial number to search for" $Value = "*$GetName*" Get-ADComputer -Filter{ name -like $Value} -Propertie...
by mqh777
Thu Jun 21, 2018 1:13 pm
Forum: PowerShell GUIs
Topic: Remember past entries
Replies: 3
Views: 666

Remember past entries

PowerShell Studio 2018 v5.5.150 Windows 10 x64 We have a PowerShell Studio tool, it has a text box that you can enter a computer name into. Is there a way for this text box to remember the past 5 entries? We have cryptic computer names so our support techs wanted the tool to remember the last 5 (or ...
by mqh777
Wed Jun 20, 2018 11:10 am
Forum: PowerShell GUIs
Topic: radio buttons within PowerShell Studio
Replies: 7
Views: 1404

Re: radio buttons within PowerShell Studio

thank you and I did get mine to work. I was running it all on my own PC where I'm a local admin. But it only worked when I launched my compiled .exe as "administrator" But I have another question on radio buttons. How do you clear them? I have a button on my form that when pressed clears all text fi...
by mqh777
Wed Jun 20, 2018 9:41 am
Forum: PowerShell GUIs
Topic: radio buttons within PowerShell Studio
Replies: 7
Views: 1404

Re: radio buttons within PowerShell Studio

Why do you have three copies of the same block of code?
I was only trying to illustrate the different ways I've coded this and none work. That is why I had three copies of the same block.
by mqh777
Wed Jun 20, 2018 9:26 am
Forum: PowerShell GUIs
Topic: radio buttons within PowerShell Studio
Replies: 7
Views: 1404

radio buttons within PowerShell Studio

I have a function that will change the timezone on any computer. This function works fine when run from within PowerShell ISE but it does not change anything when run from within PowerShell Studio 2018 v5.5.150. I have tried the following: $NewTZ = "" if ($radiobuttonPacific.Checked -eq $true){$NewT...
by mqh777
Fri May 18, 2018 6:55 am
Forum: PowerShell GUIs
Topic: Hide button
Replies: 1
Views: 543

Hide button

PowerShell Studio 2018 v5.5.150 I know I can use logic like this to hide a button. if ($user1 -like '*JoeUser*' ){ Start-Sleep -m 1 } Else { $tabpage1.Enabled = $false} But is it possible to have a Button disabled until a TextBox has text? We want users to enter text into a textbox field and then pr...
by mqh777
Tue May 15, 2018 8:27 am
Forum: PowerShell GUIs
Topic: run as different user
Replies: 7
Views: 1412

Re: run as different user

OK, here is my entire code: Each registry value exists and contains the correct information. $form1_Load={ $Computer1 = (get-ItemProperty hklm:\System\Build\Deploy).OriginalPCName $GetOU = (get-ItemProperty hklm:\System\Build\Deploy).MachineOU Get-AdComputer "$Computer1" | Move-AdObject -Target "$Ge...
by mqh777
Tue May 15, 2018 7:41 am
Forum: PowerShell GUIs
Topic: run as different user
Replies: 7
Views: 1412

Re: run as different user

the command has to run as an elevated user. and we'd like it to be a compiled .exe. So what would my syntax be? thank you.
by mqh777
Mon May 14, 2018 2:52 pm
Forum: PowerShell GUIs
Topic: run as different user
Replies: 7
Views: 1412

Re: run as different user

I have also tried to place all of the code from "c:\Windows\BuildFiles\Move.ps1" into my Form1 and use Invoke-Command instead. This also does Not move the computer nor does it log anything. Invoke-Command -Credential $cred -scriptblock { $Begin = "This is the beginning of the Move script" $Finish = ...
by mqh777
Mon May 14, 2018 1:57 pm
Forum: PowerShell GUIs
Topic: run as different user
Replies: 7
Views: 1412

run as different user

Product, version and build: PowerShell Studio 2018 v5.5.150 32 or 64 bit version of product: 64-bit Operating system: Windows 10 32 or 64 bit OS: 64-bit I need to run a .ps1 script with elevated credentials. $form1_Load={ $user = "domain\ElevatedUser" $secPW = ConvertTo-SecureString -String "Pa$$wor...