Search found 8181 matches

by Alexander Riedel
Thu Feb 02, 2023 8:07 am
Forum: PowerShell
Topic: script file "self destruct" on compiled EXE file
Replies: 3
Views: 271

Re: script file "self destruct" on compiled EXE file

You cannot delete an executable file that is in use. Not from the inside.
Here is a discussion on the subject:
https://stackoverflow.com/questions/160 ... executable
by Alexander Riedel
Wed Feb 01, 2023 5:32 pm
Forum: PowerShell Studio
Topic: Windows Service in Powershell 7.*
Replies: 1
Views: 345

Re: Windows Service in Powershell 7.*

Last time we checked the .NET runtime did not like being pressed into service (pun intended).
We can revisit that with a later version of course.
by Alexander Riedel
Wed Feb 01, 2023 5:20 pm
Forum: PowerShell Studio
Topic: POWERSHELL Studio 2022 prompting for ID and Password each time I click on the RUN icon (green triangle)
Replies: 1
Views: 120

Re: POWERSHELL Studio 2022 prompting for ID and Password each time I click on the RUN icon (green triangle)

Turn off elevation. It's the shield icon in the platform panel in the ribbon. I should probably point out that contrary to the title of this topic, it is not PowerShell Studio prompting for anything. It is a standard Windows elevation prompt. It protects you from inadvertently running applications a...
by Alexander Riedel
Wed Feb 01, 2023 1:53 am
Forum: Customer Service
Topic: Getting "A referral was returned from the server" msg
Replies: 1
Views: 371

Re: Getting "A referral was returned from the server" msg

A quick Google search indicates that your group policy only allows signed executable files to run elevated.
Disable that policy or use a certificate to sign your executable.
by Alexander Riedel
Sun Jan 29, 2023 12:22 pm
Forum: PowerShell Studio
Topic: Details on Start sequence and use of Startup.pss and globals.ps1
Replies: 4
Views: 1202

Re: Details on Start sequence and use of Startup.pss and globals.ps1

Here is an example I found on twitter recently that illustrates this: #PowerShell tip: if you're using `Get-Content` to simply read a file, it's much faster to use [http://System.IO.File]::ReadAllBytes() or [http://System.IO.File]::ReadAllText() even in a pipeline. About 95% faster! `Get-Content` is...
by Alexander Riedel
Sun Jan 29, 2023 12:10 pm
Forum: PowerShell Studio
Topic: Details on Start sequence and use of Startup.pss and globals.ps1
Replies: 4
Views: 1202

Re: Details on Start sequence and use of Startup.pss and globals.ps1

As you stated, knowing PowerShell is obviously key. PowerShell itself is deeply rooted in .NET and so is WinForms. I would strongly recommend to take a beginner's class in C#. May it be online video, book or in person, it will enable you to read and understand concepts. Many tips and tricks and samp...
by Alexander Riedel
Fri Jan 27, 2023 2:53 pm
Forum: PowerShell Studio
Topic: Script engine missing PS7
Replies: 2
Views: 1020

Re: Script engine missing PS7

That is not how PowerShell 7 and the underlying framework works. All these DLLs and associated files are not generated for fun, they are required. Here is an article from a while ago that explains things in more detail: https://www.sapien.com/blog/2020/08/12/packaging-scripts-for-powershell-7-and-ne...
by Alexander Riedel
Thu Jan 26, 2023 11:39 am
Forum: PowerShell Studio
Topic: PowerShell Studio not switch out on Alt-Tab
Replies: 5
Views: 2813

Re: PowerShell Studio not switch out on Alt-Tab

Yes that tracks. It seems a genuine Windows 11 machine acts differently than an updated one.
This, by the way, is not the only thing that is different. Keeps it interesting. We will keep looking.