windows powershell
1214 TopicsNew-SMBMapping not showing in Explorer until Explorer process is closed/restarted
I'm writing a script to remap drives to new paths (file server migration), and I had everything working. I'm using Remove-SMBMapping and New-SMBMapping. While it was working there was a strange bug where it would only work if I pasted the code directly into powershell. But if I called the .ps1 script file, the drive mappings would change (as verified by NET USE from the command line), Explorer continued to show and use the old drive mappings. If I end process for Explorer.exe and re-run it, then it would show and use the new mappings. I just ignored this at the time. Well now I'm doing some more testing, now no matter what I do, when using New-SMBMapping in any way, Explorer refuses to see the drive (even new mappings) while the system does see the correct drives via cmdline. I'm at a complete loss as to why this is an issue. It occurs in both Powershell 7 as well as Windows Powershell 5.1. Does anyone have a clue as to what is happening here? FWIW I know that drives mapped in the standard UAC user context are not visible to admin contexts and vice versa. That is not the issue here. This is all under the same user context. No elevated admin sessions are at play. In fact, if it were this, restarting Explorer would have no affect. Also this is an issue whether -persistent $true is used or not. Finally, if I just simply use native Windows cmd prompt command "Net Use" to map the drive, even within the Powershell console, everything works as expected. This is only an issue using the powershell specific cmdlet to map the drive.22KViews1like17CommentsLatest Update to my PowerShell 7.x ISE
Hello Everyone, I have been working on my PS7 Scripting ISE for a while now. I have just updated it in the store. I took a lot of advise form some of the users and made some hefty upgrades. The Editor now has very robust PowerShell focused processes. You can Highlight and Right-click on text and see formatting options like, create an array or sort ascending. I added the ability to un-dock/dock the debug panes for those of you that have multi-screens. There is more so, play around with it and tell me what you think. I am still working out any lingering bugs. So far it is pretty solid. It is in the MS Store. Look for PS7ScriptDesk Regards, -Ron Oh, it is free to everyone!55Views0likes0CommentsPowerShell 7.x ISE-style app — would anyone be interested in testing or reviewing the source?
Hi everyone, My name is Ron, and I have been working on a Windows desktop app called PowerShellStudio. It is intended to be a modern PowerShell 7.x ISE-style scripting environment for Windows. The app is written in .NET 10 using Visual Studio 2026. I am not trying to replace VS Code. The idea is closer to the original Windows PowerShell ISE: a focused editor, integrated PowerShell console, script execution, syntax diagnostics, command and parameter completion, metadata-based IntelliSense, and a simpler workflow for people who liked the old ISE experience. The app is running and usable, but it is still under active development. Before I go further, I wanted to see whether there is any community interest. I am preparing a final preview version to add to GitHub. If people are interested, I will upload the complete source code so anyone can examine it, build it, and run it themselves. Since this is a scripting tool that can run local PowerShell code, I want to make the project as transparent as possible. I would especially appreciate feedback on: Whether this kind of app would be useful to anyone How the editor and console should behave compared with the legacy ISE What features would be expected before it feels useful Any concerns about the approach Whether anyone would be willing to test or review the code I am not presenting it as finished or perfect. I am looking for honest feedback while I am still actively working on it. Thanks, Ron793Views1like9CommentsWhat is PowerShell uses for?
I want to learn more about Windows, Networking and cyber security. I want to learn to write a little bit of program in network and looking into virus, not just get anti virus programs, caution about opening emails and texts. I have been searching, they said Powershell is one of the things to learn. I spent a few weeks on writing html so I can look inside the html files. My next plan is to study windows 11 deeper. People have been saying learn Python and Javascript is important as they are used to write Client and Server side programs. Bottom line, I want to know your opinion and how deep I need to study PowerShell for what I want to do? I have no intention to be expert of PowerShell coding just stepping stone to my goal. Thanks70Views0likes0CommentsPowershell Set-AuthenticationPolicy issues
Hello, I'm trying to selectively enable basic authentication on a service account for use with our backup system to back up Exchange public folders. I believe the syntax should be: Set-AuthenticationPolicy -Identity email address removed for privacy reasons -AllowBasicAuthAutodiscover But that returns an error: Write-ErrorMessage : Ex6F9304|Microsoft.Exchange.Configuration.Tasks.ManagementObjectNotFoundException|The operation couldn't be performed because object 'email address removed for privacy reasons' couldn't be found on 'MWHPR04A06DC004.NAMPR04A006.PROD.OUTLOOK.COM'. At C:\Users\User\AppData\Local\Temp\tmpEXO_uokxac5b.pq4\tmpEXO_uokxac5b.pq4.psm1:1098 char:13 + Write-ErrorMessage $ErrorObject + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Set-AuthenticationPolicy], ManagementObjectNotFoundException + FullyQualifiedErrorId : [Server=CH0PR16MB4330,RequestId=8ce97291-b766-650a-eb43-53b0f5af836c,TimeStamp=Wed, 11 J an 2023 20:41:47 GMT],Write-ErrorMessage I've verified that the identity is correct with "get-user -identity email address removed for privacy reasons" and it returns the correct information. Why would that identity not be found by Set-AuthenticationPolicy? I've tried with various identities (including my own), all live active accounts, and get the same result each time. Any help would be appreciated!Solved2.6KViews0likes3CommentsPackage failed to install because: End of Central Directory record could not be found.
Trying to install any package results in a hash mismatch. Here's my verbose output: PS C:\Users\jh> install-module powershellget -verbose -scope AllUsers VERBOSE: Using the provider 'PowerShellGet' for searching packages. VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories. VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'. VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2' and PackageManagementProvider is 'NuGet'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='powershellget'' for ''. VERBOSE: Total package yield:'1' for the specified package 'powershellget'. VERBOSE: Performing the operation "Install-Module" on target "Version '2.2.3' of module 'PowerShellGet'". VERBOSE: The installation scope is specified to be 'AllUsers'. VERBOSE: The specified module will be installed in 'C:\Program Files\PowerShell\Modules'. VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'. VERBOSE: Downloading module 'PowerShellGet' with version '2.2.3' from the repository 'https://www.powershellgallery.com/api/v2'. VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PowerShellGet'' for ''. VERBOSE: Package 'PackageManagement' is already installed. VERBOSE: Package 'PackageManagement' is already installed. VERBOSE: InstallPackage' - name='PowerShellGet', version='2.2.3',destination='C:\Users\jh\AppData\Local\Temp\1026672374' VERBOSE: DownloadPackage' - name='PowerShellGet', version='2.2.3',destination='C:\Users\jh\AppData\Local\Temp\1026672374\PowerShellGet.2.2.3\PowerShellGet.2.2.3.nupkg', uri='https://www.powershellgallery.com/api/v2/package/PowerShellGet /2.2.3' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/PowerShellGet/2.2.3'. VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/PowerShellGet/2.2.3'. VERBOSE: Completed downloading 'PowerShellGet'. VERBOSE: Hash for package 'PowerShellGet' does not match hash provided from the server. VERBOSE: InstallPackageLocal' - name='PowerShellGet', version='2.2.3',destination='C:\Users\jh\AppData\Local\Temp\1026672374' Install-Package: C:\program files\powershell\7-preview\Modules\PowerShellGet\PSModule.psm1 Line | 9683 | $installedPackages = PackageManagement\Install-Package @PSBoundParameters | ^ Package 'PowerShellGet' failed to be installed because: End of Central Directory record could not be found. Running from a win10 work PC with admin rights in an elevated PowerShell session. Any help would be appreciated.44KViews0likes5CommentsGet-ChildItem | Write-Host
The command in the title lists all the short names of files and folders in the current folder, whereas `Get-ChildItem * | Write-Host` lists the full names (including paths). I compared the output of `Get-ChildItem | gm` with the output of `Get-ChildItem * | gm`: no difference. If the very same objects are piped into Write-Host, how can the cmdlet give consistently different outputs?776Views0likes5Comments"VBAF Learning Trail -- From Zero to AI Developer in PowerShell 5.1"
VBAF -- Getting Started A Guided Trail from Zero to AI Developer Welcome. You are about to learn how artificial intelligence actually works -- not by reading about it, but by running it, watching it, and breaking it. VBAF implements neural networks, reinforcement learning and multi-agent systems from scratch in PowerShell 5.1. Every algorithm is readable. Every concept is explained in the code comments. This guide takes you from installation to building your own AI agent. Follow the camps in order. Do not skip ahead. Time required: 2-4 hours for Camps 0-3. Camps 4-5 are open-ended. CAMP 0 -- BASECAMP Get VBAF installed and your first output on screen Goal: see "VBAF Framework ready!" on your screen Step -- Install VBAF from PSGallery392Views0likes2Comments**Title:** VBAF -- educational AI and reinforcement learning framework in pure PS 5.1
Hello, I have been building an educational framework for learning AI concepts in PowerShell 5.1 and wanted to share it with this community. VBAF (Visual AI & Reinforcement Learning Framework) implements neural networks, Q-learning, DQN, PPO and A3C from scratch -- no Python, no external dependencies, no cloud services. The goal is to make AI concepts accessible to PowerShell developers. Every algorithm has full comments explaining the mathematics in plain English, with references to the original research papers. Quick start: ```powershell Install-Module VBAF -Scope CurrentUser . .\VBAF.LoadAll.ps1 # See a neural network learn XOR & .\VBAF.Core.Example-XOR.ps1 # Train a DQN agent on CartPole $agent = (Invoke-DQNTraining -Episodes 50 -FastMode)[-1] $agent.PrintStats() ``` The framework also includes a multi-agent market simulation where four company agents compete using Q-learning -- price wars, innovation races and tacit collusion emerge naturally without being programmed. For teachers: docs/teaching/ contains a 4-week course outline, lab exercises and exam questions. GitHub: https://github.com/JupyterPS/VBAF PSGallery: https://www.powershellgallery.com/packages/VBAF Happy to answer any questions about the implementation choices or the PS 5.1 class system quirks. Henning -- Roskilde, Denmark186Views0likes0Comments