Posts toplist
Rating posts
-
- Post
- Been upvoted
- Author
- Rating
-
-
Tue Aug 15, 2023 5:04 pm Ghost Window Tue Aug 15, 2023 5:04 pm Ghost Window
Product: PowerShell Studio 2023 (64 Bit) Build: v5.8.227 OS: Windows 10 Pro (64 Bit) Build: v10.0.19045.0 PS V5 Ghost 1.png Ghost 2.png URL Bug # 6 This just popped up again, this time on my workstation I was trying to run stuff in the console and it was not responding, so I restarted the console an... - 1 Been upvoted
- Woody_033 Author
- Rating Rating: 50%
-
-
-
Wed Dec 11, 2019 8:28 am Re: try... catch... not firing Wed Dec 11, 2019 8:28 am Re: try... catch... not firing
Alright, let me first state that I understand your frustration. Every software developer hates little more than code working in one spot but not the other for no apparent reason. But, let me address this here as clearly as possible, since this keeps coming up. Windows Forms is part of the Microsoft ... - 1 Been upvoted
- Alexander Riedel Author
- Rating Rating: 50%
-
-
-
Mon Feb 15, 2021 1:58 pm Re: Script Cannot Find Called Script Mon Feb 15, 2021 1:58 pm Re: Script Cannot Find Called Script
It's a good practice to always check if the path is correct. if (!(Test-Path $PathToFile)) { Write-Warning "$PathToFile not found" } else { $result = & $PathToFile -Variable1 $var1 -Variable2 $var2 } If you are running a script from an admin console, elevated, some personal folders may... - 1 Been upvoted
- Alexander Riedel Author
- Rating Rating: 50%
-
-
-
Mon Mar 08, 2021 3:30 pm Re: Problem with powershell Studio Mon Mar 08, 2021 3:30 pm Re: Problem with powershell Studio
You didn't post any code. :D
It would also help if you'd post the error message(s) and/or describe what exactly constitutes "not working". - 1 Been upvoted
- Alexander Riedel Author
- Rating Rating: 50%
-
-
-
Sat May 08, 2021 8:07 am Re: Run GUI with build in credentials Sat May 08, 2021 8:07 am Re: Run GUI with build in credentials
You can set the package to run with alternate credentials when you package the script. See the documentation for instructions.
- - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Wed Feb 23, 2022 11:52 pm Re: JSON manipulation using Powershell Wed Feb 23, 2022 11:52 pm Re: JSON manipulation using Powershell
Guys. Please keep it professional and courteous. - 1 Been upvoted
- Alexander Riedel Author
- Rating Rating: 50%
-
-
-
Sat Mar 26, 2022 6:24 pm Re: PowerShell Studio 2022 $Profile Cannot take effect Sat Mar 26, 2022 6:24 pm Re: PowerShell Studio 2022 $Profile Cannot take effect
That is correct. PSS does not allow access to the "$profile" object. You have to load any profile you want in code. If PS is installed at 5.x on Windows 10, 11 then the method I posted will load the current user's profile. That is what you seem to have stated that you needed. All of the pr... - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Fri Apr 29, 2022 4:44 pm Re: Module Manifest Fri Apr 29, 2022 4:44 pm Re: Module Manifest
Well the reason I'm here is cause I had the both in the same file and it didn't work. When I wrote the psm1 originally I got the same error. Then I read that PS loads the classes first, and then the other stmts. So the type def has to be loaded into the session before the classes. And I just tried i... - 1 Been upvoted
- sean@midnightdba.com Author
- Rating Rating: 50%
-
-
-
Thu May 12, 2022 3:59 pm Re: Error handling calling a converted script to exe from a script specifying a wrong named parameter Thu May 12, 2022 3:59 pm Re: Error handling calling a converted script to exe from a script specifying a wrong named parameter
Exception messages do not appear on StdErr unless you catch them in the script and send them to StdErr. By default all test output is sent to StdOut. Exception messages are sent to the console and when packaged all of that goes to StdOut. This is the default behavior of all Windows processes and the... - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Fri May 20, 2022 7:40 pm Re: Deployment N00b! Fri May 20, 2022 7:40 pm Re: Deployment N00b!
I would suggest clicking the link in PSS for the documentation and reading how the builder and deployer work which will give you all of the options available and fair explanation of how to build and deploy an EXE with examples. Read the following carefully and do the examples. https://info.sapien.co... - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Sat May 21, 2022 5:00 pm Re: Deployment N00b! Sat May 21, 2022 5:00 pm Re: Deployment N00b!
You will have to be more specific. External scripts means dot sourced scripts. Modules cannot be resolved and packaged, that would defeat the purpose of a module. Not sure what you mean by it cannot 'see' them. Generally, it is best to provide the code you use to access something and the resulting e... - 1 Been upvoted
- Alexander Riedel Author
- Rating Rating: 50%
-
-
-
Sat May 21, 2022 11:45 pm Re: Deployment N00b! Sat May 21, 2022 11:45 pm Re: Deployment N00b!
I am sure you realized that the files don't actually exist in the folders indicated. The executable resulting from packaging is not created in the same folder as your original script. So you have to copy/move any auxiliary files relative to where the executable is. https://www.sapien.com/blog/2009/0... - 1 Been upvoted
- Alexander Riedel Author
- Rating Rating: 50%
-
-
-
Fri Jun 17, 2022 9:32 am Re: Creating GUI Fri Jun 17, 2022 9:32 am Re: Creating GUI
PowerShell cannot build Web forms. Your question is impossible to answer because you have not shown any code that does anything. It is necessary to learn at least the basics of PowerShell and Windows. With some basics you will find it easier to ask a question. I recommend two ways to get started lea... - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Thu Jul 14, 2022 3:23 pm Re: Executing Powershell remotely without installing modules locally ? Thu Jul 14, 2022 3:23 pm Re: Executing Powershell remotely without installing modules locally ?
That is the best method to make a remote application available to all desktops without having to install anything on the desktop machine. - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Tue Aug 23, 2022 12:40 am Re: Hashtable empty only in use of Powershell Studio 2022 Tue Aug 23, 2022 12:40 am Re: Hashtable empty only in use of Powershell Studio 2022
PSS does not execute code. All code is executed by the PS engine. Perhaps you are not using the same engine. The use of "$_" as an enumerator variable will not work in all things. It is a reserved variable and cannot be assigned. Change it to a real variable. I see no reason to create a ha... - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Thu Mar 23, 2023 5:29 pm Re: Performing Get-Service with failback using Get-WMIObject ? Thu Mar 23, 2023 5:29 pm Re: Performing Get-Service with failback using Get-WMIObject ?
You do not have access rights on the services and on WMI. Please ask you server administrator for help with this. - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Sun Feb 06, 2022 5:52 am Re: VBA and UIs Sun Feb 06, 2022 5:52 am Re: VBA and UIs
I am very new to VBA (I love to hate VB generally), but it seems like I have not choice but to use it to create an Outlook macro that will do some e-mail related tasks with a users clicks on the button. I am curious as to which tool I would use to create the VBA script, and if there's the option of... - 1 Been upvoted
- dasinmd_ Author
- Rating Rating: 50%
-
-
-
Wed Jul 23, 2014 5:55 pm Re: Output data to listbox Wed Jul 23, 2014 5:55 pm Re: Output data to listbox
Whatever jvierra, if i read everything and knew everything i wouldn't have to ask questions. Its responses like yours that turn new users off. I'm glad I don't react that way when someone asks about VMWare, I try to spread the knowledge that I have in my field of expertise. In my way of thinking the... - 1 Been upvoted
- fair64 Author
- Rating Rating: 50%
-
-
-
Mon Jul 13, 2015 5:09 pm Re: DataGridView Saving and Printing Mon Jul 13, 2015 5:09 pm Re: DataGridView Saving and Printing
Same thing: [powershell]$datagridview1.Rows |
select -expand DataBoundItem |
Format-Table -Auto |
Out-String |
Out-File printfile.txt[/powershell] - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Thu May 11, 2017 8:06 am Re: GUI: Progress Multiple Com Objects/Progress Bar - Responsive Form Thu May 11, 2017 8:06 am Re: GUI: Progress Multiple Com Objects/Progress Bar - Responsive Form
What does you jobscript look like? Did you try mu test? [b]$jobscript = { Get-ChildItem$env:ProgramFiles -recurse }[/b]
In the completed script just do this.[codebox=powershell file=Untitled.ps1]$Competed = {
Param($job)
$res = $job | Receive-Job
[System.Windows.Forms.MessageBox]::Show( $res.Count)
}[/codebox] - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Fri Oct 12, 2018 4:01 am Re: Select All Items in a CheckedListBox Fri Oct 12, 2018 4:01 am Re: Select All Items in a CheckedListBox
[code]
# check all items
(0..($checkedlistbox1.Items.Count -1)) | %{ $checkedlistbox1.SetItemChecked($_,$true)}[/code] - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Tue Feb 02, 2021 10:24 am Re: Refresh Gridview, focus on row selected in middle of grid (scrollbar) Tue Feb 02, 2021 10:24 am Re: Refresh Gridview, focus on row selected in middle of grid (scrollbar)
https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.datagridview.firstdisplayedscrollingrowindex?view=net-5.0#System_Windows_Forms_DataGridView_FirstDisplayedScrollingRowIndex [b]$dataGridView1.FirstDisplayedScrollingRowIndex = $dataGridView1.SelectedRows[0].Index[/b] - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Fri Mar 19, 2021 11:14 am Re: Listbox with word wrap Fri Mar 19, 2021 11:14 am Re: Listbox with word wrap
First, set the listbox's DrawMode to OwnerDrawVariable. Then use the MeasureItem event to calculate the height of the items and the DrawItem event to actually draw the item. Here is a rough example to get you started: $listbox1_MeasureItem=[System.Windows.Forms.MeasureItemEventHandler]{ if ($listbox... - 1 Been upvoted
- brittneyr Author
- Rating Rating: 50%
-
-
-
Sun Apr 04, 2021 3:27 am Re: Add a calculated field to result data from a database Sun Apr 04, 2021 3:27 am Re: Add a calculated field to result data from a database
Here is a simple example that doesn't alter the table after it is built except to assign the correct values. function Update-Grid_Database4_ComputersTable{ param( [Parameter(Mandatory)] [string[]]$ComputerName ) $connStr = 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=database.mdb;Password=;User ID=... - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-
-
-
Mon Apr 05, 2021 6:48 pm Re: PowerShell GUI - Hide actual URLs in RichTextBox Mon Apr 05, 2021 6:48 pm Re: PowerShell GUI - Hide actual URLs in RichTextBox
A little investigation shows that you cannot create hidden text in the RichTextControl. This may be for security reasons. - 1 Been upvoted
- jvierra Author
- Rating Rating: 50%
-