====== [hemmerling] Scripting Languages for Windows 2/3 - Windows PowerShell ====== Related page: *[[wscripting.html|Scripting Programming Languages for Windows 1/3]]. *[[wscripting03.html|Scripting Programming Languages for Windows 3/3 - Testing with Windows PowerShell]]. ===== Windows PowerShell - Software ===== ==== Windows PowerShell 5 - Download for Win7, Win8.1 ==== *[[http://www.microsoft.com/en-us/download/details.aspx?id=48729|Microsoft Download "Windows Management Framework 5.0 Production Preview"]], 2015-09-08. ==== Windows PowerShell 4 - Download for Win7 ==== *[[http://www.microsoft.com/en-us/download/details.aspx?id=40855|Microsoft Download Center "Windows Management Framework 4.0"]] - PowerShell4 plus some documents about "Desired State Configuration". ==== Windows PowerShell 5 - Download for Win7 ==== *[[http://www.microsoft.com/en-us/download/details.aspx?id=50395|Microsoft Download Center "Windows Management Framework 5.0"]] - "Includes updates to Windows PowerShell, Windows PowerShell Desired State Configuration (DSC), Windows Remote Management (WinRM), Windows Management Instrumentation (WMI)". *[[https://blogs.msdn.microsoft.com/powershell/2016/02/24/windows-management-framework-wmf-5-0-rtm-packages-has-been-republished/|Windows PowerShell Blog "windows Management Framework (WMF) 5.0 RTM packages has been republished"]], 2016-02-24. ==== Development Tools ==== -ISE - The free IDE shipped with PowerShell. *[[http://en.wikiversity.org/wiki/Windows_PowerShell/ISE|Wikiversity "Windows PowerShell/ISE"]]. *The free [[http://social.technet.microsoft.com/wiki/contents/articles/2969.windows-powershell-ise-add-on-tools.aspx|Microsoft TechNet "Windows PowerShell ISE Add-On Tools"]]. *The free "ISE Session Tools". *[[http://www.stackoverflow.com/questions/7338395/is-it-possible-to-reset-the-runspace-in-powershell-ise|StackOverflow "Is it possible to reset the runspace in Powershell ISE?"]]. *[[http://web.archive.org/web/*/http://www.nivot.org/post/2011/02/14/MakingWindowsPowerShellISEGoodEnough|Archive.org "Nivot Ink. The ramblings of code enthusiast and PowerShell MVP, Oisin Grehan", article "Making Windows PowerShell ISE 'Good Enough'"]] - Download of "ISE Session Tools Module v1.0". -The free [[http://www.microsoft.com/downloads/details.aspx?familyid=D87DAF50-E487-4B0B-995C-F36A2855016E|Microsoft Downloads "Windows PowerShell Scriptomatic"]]. -The free [[https://gallery.technet.microsoft.com/scriptcenter/Powershell-Form-Builder-3bcaf2c7|Microsoft Script Center "Powershell Form Builder"]]. -The free [[http://www.powergui.org/|PowerGUI]], [[http://software.dell.com/products/powergui-freeware/|Dell Software "PowerGUI"]] - "No-cost GUI and script editor for PowerShell". *[[http://en.community.dell.com/techcenter/powergui|Dell Community, TechCenter "PowerGUI"]]. *[[http://en.community.dell.com/techcenter/powergui/w/documents|Dell Community, TechCenter "PowerGUI Documents"]]. *The Wiki [[http://en.community.dell.com/techcenter/powergui/w/wiki|Dell Community, TechCenter "PowerGUI Wiki"]]. *[[http://powershell.org/wp/tag/powergui/|PowerShell, Kirk Munro "One for the road: Stepping away from PowerGUI"]], 2011-07-28 - "...however my work on PowerGUI has stopped for now". *[[http://dmitrysotnikov.wordpress.com/2009/06/01/clearing-powershell-runspace-before-debugging/|Dmitry's Blog: Cloud, PowerShell and beyond. Dmitry Sotnikov's view on Cloud, PowerShell, PowerGUI and everything he sees around "Clearing PowerShell runspace before debugging"]]. -The free [[http://www.idera.com/productssolutions/freetools/powershellplus|Idera, Inc. "PowerShell Plus"]]. -The commercial [[http://www.sapien.com/software/powershell_studio|SAPIEN Technologies, Inc "PowerShell Studio"]]. *Expert told me, that the tool is used 70% for GUI design for Powershell applications. -The commercial [[http://www.scriptrunner.de/|ScriptRunner]] - "Smart and easy administration". ==== XAML Tools ==== *The free lightweight XAML editor Kaxaml, see [[dotnet.html|Microsoft .NET Framework 1/3]]. ==== Online Development Tools ==== *The free [[http://www.poshgui.com/|POSHGUI Online Powershell GUI Designer]]. *Blog [[http://blog.poshgui.com/|POSHGUI Blog]]. ===== How to Write PowerShell Code, and C# Code for PowerShell ===== ==== Development of Functions and Advanced Functions ==== *In the IDE "ISE", press "CTRL-J" and select the code snippets "(Cmdlet) - advanced function" or "(Cmdlet) - advanced function" complete" :-) for a basic frame code. *Powershell commandline help "get-help about_Functions_Advanced_Parameters" (?). *[[http://ramblingcookiemonster.github.io/Building-PowerShell-Functions-Best-Practices/|GitHub.io, Warren F. - Rambling Cookie Monster "Building PowerShell Functions: Best Practices"]]. *[[http://blog.ipswitch.com/advanced-powershell-functions-upping-game|IP Switch "Advanced PowerShell Functions: Upping Your Game"]]. *[[http://www.lazywinadmin.com/2015/03/standard-and-advanced-powershell.html|LazyWinAdmin "Standard and Advanced PowerShell functions"]]. *Microsoft. *[[http://docs.microsoft.com/en-gb/powershell/|Microsoft Powershell Documentation]]. *[[http://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_advanced|Microsoft Powershell Documentation "About Functions Advanced"]]. *[[http://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_redirection?view=powershell-7.2|Microsoft Documentation "about_Redirection"]]: -1 Success Stream. -2 Error Stream. -3 Warning Stream. -4 Verbose Stream. -5 Debug Stream. -6 Information Stream. *[[http://blogs.technet.microsoft.com/heyscriptingguy/2015/07/09/understanding-advanced-functions-in-powershell/|Microsoft TechNet, Hey, Scripting Guy! Blog "Understanding Advanced Functions in PowerShell"]]. *[[http://technet.microsoft.com/de-de/library/hh360993.aspx|Microsoft TechNet, Don Jones "Windows PowerShell: Erstellen Sie bessere Funktionen"]]. *[[http://mcpmag.com/articles/2016/10/27/designing-powershell-functions.aspx|Microsoft Certified Professional Magazine Online (MCPmag) "Best Practices for Designing PowerShell Functions"}}. *Petri. *[[http://www.petri.com/anatomy-powershell-advanced-function|Petri IT Knowledgebase "Anatomy of a PowerShell Advanced Function"]]. *[[http://www.petri.com/creating-advance-functions-powershell|Petri IT Knowledgebase "Creating Advanced Functions in PowerShell"]]. *[[http://ss64.com/ps/syntax-function-advanced.html|SS64 "Writing an Advanced Function"]]. ==== Development of Cmdlets ==== === General === *[[http://www.darkoperator.com/blog/2012/3/29/introduction-to-microsoft-powershellndash-basics-of-running.html| "Shell is Only the Beginning. Introduction to Microsoft PowerShell– Basics of Running Cmdlets"]]. *[[http://social.technet.microsoft.com/wiki/contents/articles/4537.powershell-approved-verbs.aspx|Microsoft TechNet article "PowerShell: Approved Verbs"]]. *[[http://technet.microsoft.com/en-us/library/dd315315.aspx|Microsoft TechNet Library "Learning Windows PowerShell Names"]]. *[[http://technet.microsoft.com/en-us/magazine/ff677563.aspx|Microsoft TechNet "Windows PowerShell: Writing Cmdlets in Script"]]. *[[http://www.learn-powershell.net/2013/05/07/tips-on-implementing-pipeline-support/|Learn PowerShell. Achieve More "Tips on Implementing Pipeline Support"]]. === Help for PowerShell Cmdlets === *[[http://msdn.microsoft.com/en-us/library/dd878343%28v=vs.85%29.aspx|Microsoft MSDN Library "Writing Help for Windows PowerShell Modules"]]. *[[http://msdn.microsoft.com/en-us/library/dn622032%28v=vs.85%29.aspx|Microsoft MSDN Library "Writing Help for Windows PowerShell Cmdlets"]]. *[[http://msdn.microsoft.com/en-us/library/bb525433%28v=vs.85%29.aspx|Microsoft MSDN Library "How to Create the Cmdlet Help File"]]. ==== Development of Windows PowerShell Modules in C# ==== === Tools & Frameworks === *[[http://www.microsoft.com/en-us/download/details.aspx?id=2560|Microsoft Download Center "Windows PowerShell 2.0 Software Development Kit (SDK)"]]. *[[http://code.msdn.microsoft.com/Windows-PowerShell-30-SDK-9a34641d|Microsoft MSDN "Windows PowerShell 3.0 SDK Sample Pack"]]. === Installing / Loading of PowerShell Modules === *[[http://powershell-guru.com/dont-do-that-11-reload-a-module-with-remove-module-and-import-module/|PowerShell-Guru "Don’t do that #11: Reload a module with Remove-Module and Import-Module"]]. *To reload a just-edited PowerShell module under development, do "Import-Module -Name module -Force - Verbose". *[[http://www.stackoverflow.com/questions/24558789/how-to-import-splitpipeline-module-from-a-shared-server|StackOverflow "How to import splitpipeline module from a shared server?"]]. *The issue you're experiencing is that .NET assemblies can't be loaded from an untrusted UNC path, without special configuration. As you already discovered, the simplest solution is to copy the module to your local computer first. *To work around the "Access Denied" message, copy the module to your user directory "C:\users\Administrator\Documents\WindowsPowerShell\Modules" ( with = "Administrator"), not the system-wide directory. *How to work with local PowerShell repositories: *Register-PSRepository -SourceLocation \\computername\\path - Name repo *Install-Module - Name MyModule -Repository repo === DLL Development === == Load a Custom DLL from PowerShell == *[Reflection.Assembly]::LoadFile *[[http://www.leeholmes.com/blog/2006/10/27/load-a-custom-dll-from-powershell/|Lee Holmes, Precision Computing. Software Design and Development "Load a Custom DLL from PowerShell"]] - '[Reflection.Assembly]::LoadFile("c:\temp\MyMathLib.dll")'. *[[http://msdn.microsoft.com/en-us/library/dd409252%28VS.100%29.aspx|Microsoft MSDN Developer Network " Element"]]. *Error message when trying to load a DLL by '[Reflection.Assembly]::LoadFile("c:\temp\MyMathLib.dll")': "Exception calling "LoadFile" with "1" argument(s): "An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See [[http://go.microsoft.com/fwlink/?LinkId=155569|Microsoft MSDN Developer Network " Element"]] for more information." == Resources == *[[http://www.powershellmagazine.com/2014/03/18/writing-a-powershell-module-in-c-part-1-the-basics/|PowerShellMagazine "Writing a PowerShell module in C#, Part 1: The basics"]]. *[[http://www.powershellmagazine.com/2014/04/08/basics-of-writing-a-powershell-module-with-c-part-2-debugging/|PowerShellMagazine "Basics of Writing a PowerShell Module with C#, Part 2: Debugging"]]. *[[http://www.powershellmagazine.com/2013/03/20/the-windows-powershell-3-0-sdk-sample-pack/|PowerShellMagazine "The Windows PowerShell 3.0"]] - 'Note that in order to use the samples you’ll need to install the [[http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx|Microsoft MSDN "Windows Software Development Kit (SDK) for Windows 8"]] which includes the reference assemblies for Windows PowerShell 3.0'. *[[http://www.codeproject.com/Articles/311705/Custom-CSharp-Control-for-Powershell|Code Project "Custom CSharp Control for Powershell"]] - "IMPORTANT: You must set the correct powershell execution policy *AND* you will have to unblock the PSMap.dll file ( C:\PSMapDll-Deploy\PSMap.dll – Click on Properties -> Unblock )". ==== Development of Windows Services by Windows PowerShell ==== === Development of Windows Services by Windows PowerShell, with little help by the "Windows Server 2003 Resource Kit Tools" srvany.exe and instsrv.exe === *[[http://www.microsoft.com/en-us/download/details.aspx?id=17657|Microsoft Download Center "Windows Server 2003 Resource Kit Tools"]]. *This toolkit also contains Robocopy, before it was included in the Win2008 Server distribution. *[[http://support.microsoft.com/en-us/help/137890/how-to-create-a-user-defined-service|Microsoft Support "How to Create a User-Defined Service"]]. *[[http://www.serverhowto.de/Applikationen-als-Dienste-einrichten.228.0.html|Windows Server How-To Guides "Applikationen als Dienste einrichten"]]. === Development of Windows Services by Windows PowerShell and C# === *Microsoft *[[http://msdn.microsoft.com/en-us/magazine/mt703436.aspx|MSDN Magazine "Windows PowerShell - Writing Windows Services in PowerShell"]], [[http://msdn.microsoft.com/de-de/magazine/mt703436.aspx|MSDN Magazin "Windows PowerShell – Schreiben von Windows-Diensten in PowerShell"]]. *[[http://www.github.com/JFLarvoire/SysToolsLib/blob/master/PowerShell/PSService.ps1|GitHub "JFLarvoire/SysToolsLib/PowerShell/PSService.ps1"]]. *[[http://social.msdn.microsoft.com/Forums/en-US/9ffd5870-2704-4681-aa8e-67a681e858b3/windows-powershell-writing-windows-services-in-powershell?forum=msdnmagazine|Microsoft Docs "Windows PowerShell - Writing Windows Services in PowerShell"]]. *[[http://docs.microsoft.com/de-de/powershell/scripting/core-powershell/ise/how-to-write-and-run-scripts-in-the-windows-powershell-ise?view=powershell-5.1|Microsoft Docs "Schreiben und Ausführen von Skripts in der Windows PowerShell ISE"]]. *[[https://social.technet.microsoft.com/Forums/en-US/b840714e-879b-4625-a878-c476eb7e7943/ok-one-more-time-running-powershell-as-a-service?forum=winserverpowershell|Microsoft TechNet "Ok one more time - running Powershell as a service"]]. *[[http://www.github.com/PSUGH/PowerShell/tree/master/20-10-2017%20PowerShellWindowsDienst|GitHub "PSUGH / PowerShell/20-10-2017 PowerShellWindowsDienst/"]]# - "Einen Windows-Dienst mit PowerShell erstellen". *[[http://www.fmjf.de/2015/05/einen-windows-dienst-mit-powershell-anlegen/|Falls mal jemand fragt. IT-Blog und auch total anderes Zeug "Einen Windows-Dienst mit Powershell anlegen"]]. *[[http://www.windows-faq.de/2016/01/12/powershell-dienste-auflisten-stoppen-und-starten/|Windows-FAQ "PowerShell – Dienste auflisten, stoppen und starten"]]. *Windows Services are similar to Linux's Cron & Systemd services :-). ==== Tools, Frameworks, Technologies === === BloodHound === *[[http://github.com/BloodHoundAD/BloodHound|GitHub "BloodHoundAD/BloodHound"]] - "BloodHound is a single page Javascript web application, built on top of Linkurious, compiled with Electron, with a Neo4j database fed by a PowerShell ingestor. BloodHound uses graph theory to reveal the hidden and often unintended relationships within an Active Directory environment". === Desired State Configuration ( DSC ) of Windows === *See [[ddl.html|Device Description Languages and Device Parameterization]]. === Psake - Build Manager === *[[http://www.github.com/psake/psake|GitHub "psake/psake"]]. *[[http://en.wikipedia.org/wiki/Psake|EN.Wikipedia "Psake"]] - "A domain-specific language and build automation tool written in PowerShell to create builds using a dependency pattern similar to Rake or MSBuild. It dramatically simplifies the build language as compared to MSBuild scripting". === Generation of PowerShell GUI Applications with WPF === == The discontinued PowerBoots == *[[http://web.archive.org/web/*/http://powerboots.codeplex.com/|Archive.org "powerboots.codeplex.com"]]. *"PowerShell PowerBoots" ( - 2010-12-24 ) *"Show-UI: The PowerShell WPF Toolkit" ( - 2011-03-08 ). *Software Developer: [[http://www.huddledmasses.org/|Joel 'Jaykul' Bennett - Huddled Masses]]. *[[http://web.archive.org/web/*/http://huddledmasses.org/powerboots-tutorial-walkthrough/|Archive.org "Huddled Masses "PowerBoots: The tutorial walkthrough"]] ( - 2012-01-10 ). == ShowUI, the Successor of PowerBoot == *[[http://showui.codeplex.com/releases/view/73603|CodePlex "ShowUI: Write-UI -in PowerShell"]] *Software Developer: *[[http://scriptcop.start-automating.com/|Start-Automating]] - "A software services company". *[[http://www.huddledmasses.org/|Joel 'Jaykul' Bennett - Huddled Masses]]. *[[http://www.youtube.com/channel/UCP_eC0QSbtepwFjaC8N4RUg|YouTube Channel "StartAutomating"]]. *"ShowUI. Videos to get you started with ShowU" -[[http://www.youtube.com/watch?v=cR2koin9QNA|YouTube "Getting Started with ShowUI"]]. *Open ISE, execute "Import-Module ShowUI". -[[http://www.youtube.com/watch?v=09FxB0YXq7A|YouTube "Getting Started with ShowUI - Get-Input by StartAutomating"]]. -[[http://www.youtube.com/watch?v=cR2koin9QNA|YouTube "Writing Controls in ShowUI: Show-CPU by StartAutomating"]]. -[[http://www.youtube.com/watch?v=Hqn-b2HMgSM|YouTube "Show-Clock - Writing a Complete ShowUI function"]]. == Resources == *[[http://blogs.msdn.com/b/powershell/archive/2009/06/18/powerboots-0-2-is-now-available.aspx|Windows PowerShell Blog. Automating the world one-liner at a time "PowerBoots 0.2 is Now Available"]]. *[[http://learningpcs.blogspot.de/2011/08/powershell-scriptcop.html|Will - Another computer blog. A spot to record my explorations in Windows. Focused lately on PowerShell "PowerShell - ShowUI: Walkthrough"]]. *"ShowUI is the next generation PowerShell module for building user interfaces in script. It’s the merger of my previous PowerShell UI project (called PowerBoots) with one by James Brundage, former Microsoft PowerShell team member and founder of Start-Automating (called WPK) which shipped in the Windows 7 resource kit". *[[http://pauerschell.blogspot.de/2010/04/wpf-linkcollection-for-powershell.html|PauerSchell Blog "WPF Linkcollection for PowerShell"]]. *[[http://stackoverflow.com/questions/3664653/can-you-implement-model-view-viewmodel-using-powershell-and-wpf-using-powerboots|StackOverflow "Can you implement Model-View-ViewModel using Powershell and WPF using PowerBoots?"]]. === Package Manager & Repositories === *There are -Package repositories ( in the Clowd ). -Package provider. -Package manager ( on the local PC, do almost nothing, at least not "packaging" ). == Galleries / Repositories == *[[http://chocolatey.org/packages|Chocolatey Gallery]]. *[[http://gallery.technet.microsoft.com/|Microsoft TechNet Gallery]] #. *[[http://www.nuget.org/packages|NuGet Gallery]]. *[[http://www.powershellgallery.com/|PowerShell Gallery]] #. == Chocolatey == *[[http://www.chocolatey.org/|Chocolatey]]. *[[http://www.chocolatey.org/packages?q=Pester|Chocolatey - Search for "Pester"]]. *[[http://twitter.com/chocolateynuget/|Twitter "Chocolatey NuGet, @chocolateynuget"]]. *[[http://www.boxstarter.org|BoxStarter]], [[http://www.github.com/mwrock/boxstarter|GitHub "mwrock/boxstarter"]], [[http://boxstarter.codeplex.com/|CodePlex "BoxStarter"]] - "Repeatable, reboot resilient windows environment installations made easy using Chocolatey packages". == NuGet == *[[http://www.nuget.org/|NuGet]]. *[[http://docs.nuget.org/|NuGet Docs]]. *[[http://docs.nuget.org/consume/command-line-reference|NuGet Docs "Command Line Reference"]]. *[[http://docs.nuget.org/consume/installing-nuget|NuGet Docs "Installing and Updating NuGet Client"]]. *"For Visual Studio 2010, NuGet is available through the Visual Studio Extension Manager... Additionally, the extension can be installed into Visual Web Developer 2010 Express". *"Starting with Visual Studio 2012, NuGet is included in every edition (except Team Foundation Server) by default. Updates to NuGet can be found through the Extension Manager". *"To check if your copy of Visual Studio already has the NuGet extension, look for Library Package Manager in the Tools menu of Visual Studio. If your copy of Visual Studio does not already have the Library Package Manager (NuGet) extension, you can install it using the Extension Manager". *[[http://docs.nuget.org/docs/start-here/using-the-package-manager-console|NuGet Docs "Finding and Installing a NuGet Package Using the Package Manager Console"]]. *Blog [[http://blog.nuget.org/|NuGet Team Blog]]. == OneGet & PowerShellGet == *[[http://www.github.com/OneGet/|GitHub "OneGet"]], [[http://oneget.codeplex.com/|CodePlex "OneGet"]]. *[[http://technet.microsoft.com/en-us/library/dn835097.aspx|Microsoft Developer Network "PowerShellGet Module"]]. *[[http://blogs.technet.com/b/packagemanagement/archive/2015/05/05/10-things-about-oneget-that-are-completely-different-than-you-think.aspx|Microsoft TechNet Blog "PackageManagement" - "10 things about OneGet that are completely different than you think"]]. == PSGet == *[[http://www.psget.net/|PSGet]], [[http://www.github.com/psget/psget|GitHub "psget"]]. *Alternatively you can do installation manually: -Download PsGet.psm1 from [[http://www.github.com/psget/psget/|http://www.github.com/psget/psget/]]. -Copy PsGet.psm1 to your modules folder ( e.g. Modules\PsGet\ ). -Execute Import-Module PsGet (or add this to your profile). === PowerShell Remoting === *With PowerShell Remoting, you can execute PowerShell scripts on other computers running WinXP or Win7, including VirtualPCs running WinXP, Win7. *[[http://msdn.microsoft.com/en-us/library/windows/desktop/ee706585%28v=vs.85%29.aspx|Microsoft MSDN, Dev-Center - Desktop "Windows PowerShell Remoting"]]. *[[http://social.technet.microsoft.com/Forums/de-DE/windowsservergewusstwiede/thread/c12c0f68-49a4-48ae-9e16-d342fb4dac8e/|MSDN TechNet "PowerShell: Windows PowerShell Remoting"]]. *[[http://www.powershell.com/cs/blogs/news/archive/2010/03/03/administrator-s-guide-to-powershell-remoting.aspx|PowerShell.com "Administrator's Guide to PowerShell Remoting"]]. *[[http://powershell.com/cs/media/p/4908.aspx|PowerShell.com "Administrator's Guide to Windows PowerShell Remoting"]]. *Configuring PowerShell Remoting. *[[http://technet.microsoft.com/library/hh847859.aspx|Microsoft Script Center "about_Remote_Requirements"]]. *[[http://technet.microsoft.com/library/hh847748.aspx|Microsoft Script Center "Enable-PSRemoting"]]. *[[http://technet.microsoft.com/library/hh847850.aspx|Microsoft Script Center "about_Remote_Troubleshooting"]]. === PowerShell for SQL Server === *[[http://www.dbatools.io/|dbatools – best practices and instance migration module]] - "PowerShell (loves) SQL Server. Instance migrations and best practice implementations have never been safer, faster or freer". *[[http://www.idera.com/|idera - Tools for SQL Server, Sharepoint and PowerShell]]. *[[http://www.idera.com/Products/Free-Tools/PowerShell-scripts/?s=EB_SQLPass_PS|idera - Tools for SQL Server, Sharepoint and PowerShell "PowerShell scripts. Free PowerShell scripts for SQL Server, AD, Exchange and SharePoint"]]. *[[http://www.idera.com/Promo/Practical-PowerShell/?s=EB_SQLPass_PS|idera - Tools for SQL Server, Sharepoint and PowerShell "Practical PowerShell Video Series"]]. *[[http://www.idera.com/Education/PowerShell-Webcasts/?s=EB_SQLPass_PS|idera - Tools for SQL Server, Sharepoint and PowerShell]]. === PowerShell Testing === *See [[wscripting03.html|Scripting Programming Languages for Windows 3/3 - Windows Powershell]]. === Frameworks by Friedrich "Fred" Weinmann === *[[http://www.psframework.org/|PowerShell Framework]] - "The project dedicated to empowering your PowerShell scripting". *[[http://www.admf.one/|Active Directory Management Framework]] - "Configuration driven Active Directory management.". ===== Just Enough Admin ( JEA ) ====== *[[http://www.github.com/PowerShell/JEA|GitHub "PowerShell"]]. *[[http://docs.microsoft.com/en-gb/powershell/jea/|Microsoft Docs, Powershell "Just Enough Administration"]]. *[[http://blogs.technet.microsoft.com/germany/2017/02/09/demo-wie-funktioniert-just-enough-administration-unter-windows-server-2016/|Microsoft TechNet "Demo: Wie funktioniert Just Enough Administration unter Windows Server 2016"]]. *[[http://www.searchdatacenter.de/definition/PowerShell-Just-Enough-Administration-JEA|SearchDataCenter.de "PowerShell Just Enough Administration (JEA)"]]. *[[http://www.windowspro.de/marcel-kueppers/admin-aufgaben-delegieren-just-enough-administration-jea|WindowsPro - Windows, VIrtualisierung und Cloud für Profis "Admin-Aufgaben delegieren mit Just Enough Administration (JEA)"]]. *[[http://www.petri.com/powershell-5-0-just-enough-administration-jea-part-1-understanding-jea-and-configuring-the-demo-toolkit|Petri IT Knowledgebase "PowerShell 5.0 Just Enough Administration (JEA) Part 1: Understanding JEA and Configuring the Demo Toolkit"]]. *[[http://www.petri.com/powershell-5-0-just-enough-administration-jea-part-2-creating-toolkits-and-understanding-logs|Petri IT Knowledgebase "PowerShell 5.0 Just Enough Administration (JEA) Part 2: Creating Toolkits and Understanding Logs"]]. *[[http://www.esecurityplanet.com/network-security/using-powershell-and-jea-to-secure-windows-server-systems.html|eSecurity Planet "Using PowerShell and JEA to Secure Windows Server Systems"]]. ===== Windows PowerShell Tips & Tricks ====== *Best training strategy, according to PowerShell experts: -First learn how to use PowerShell for Windows system administration. -Afterwards, you may also learn how to use PowerShell as a Window developer. *Run "start /w aCommand" to get the script prompt back after the execution of the command "aCommand" is finished. Else the prompt returns immediately and the shell does not wait for completion of the execution of "aCommand". *The most important commands :-) for rookies: -PowerShell command "get-command". -PowerShell command "get-help". -Application "powershell_ise.exe". -Since PowerShell 3, help must be installed manually, by "Update-Help -force -verbose UIculture de-DE", Update-Help -UICulture 'en-US'. *There are 2 levels of compatibility ^ ^ ^ ^ ^ ^Version ^ .NET ^ Compatibility ^ Operating System ^ Comments ^ ^ Powershell 1 | .NET 2.0 | 1 & 2 | WinXP | outdated | ^ Powershell 2 | .NET 2.0, .NET 3.5 | ::: | WinXP | supported | ^ Powershell 3 | .NET 4.0, .NET 4.5 | 3 & 4 | Win7, Win8 | supported | ^ Powershell 4 | .NET 4.0, .NET 4.5 | ::: | Win7, Win8.1 | supported, can't be installed on Win8 | ^ Powershell 5 | ? | ::: | Win7, Win2012, Win8.1, Win10 | supported | ^ | | | | | *Redirection: *In opposite to the Linux / Unix shells, e.g. Bourne Shell, there is no input redirection, even with "Powershell 5" :-(. *Full output redirection was a lately implemented feature of Powershell :-). *Remember that with output redirection, not plain text, but objects are returned - that's much more than available with Bourne Shell or other text-based input redirection. *How to redirect StdErr with PowerShell: "application.exe 2>&1 >saved_stderr.txt". *[[http://stackoverflow.com/questions/183901/how-to-start-powershell-from-windows-explorer|Stack Overflow "How to start PowerShell from Windows Explorer?"]] - "In Windows Explorer, just go to the Address Bar at the top (keyboard shortcut: Alt+D) and type powershell and press Enter. A PowerShell command window opens with the current directory". *If you don´t own Win8.1 or Win2012Server, you don´t get the latests high-level functions. On Win7 and Win2008Server, if you want do implement the missing high-level functions by your own, you have to write .NET software in C#. *Unfortunately, the names of methods you need are not mentioned in the PowerShell documentation. Instead, you have to find it in the .NET and WPL documentation, by yourself! *It is challenging to get names of methods you want to use, by the .NET and WPL documentation. *PowerShell Execution Policies. *[[http://technet.microsoft.com/library/hh847748.aspx|Microsoft TechNet "about_Execution_Policies"]]. *I myself like to create and use a batch file "powershell_unrestricted.ps1" with the contents "PowerShell.exe -ExecutionPolicy Unrestricted" :-) to work without restrictions. *[[http://www.stackoverflow.com/questions/1825585/determine-installed-powershell-version|StackOverflow "Determine installed PowerShell version"]] - "$PSVersionTable.PSVersion". *File location: *Modules: *Powerscript modules are located in subdirectories of the Windows directory "C:\Windows\System32\WindowsPowerShell\v1.0\Modules". *You may open your modules directory with PowerShell by "explorer.exe ($PSHOME | Join-Path -ChildPath Modules)". *Autoexec files ( e.g. = "Administrator" ). If you refer to other files in the directory, you have to specify the full absolute path to it! *"C:\Users\Administrator\Documents\WindowsPowerShell". *"C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1". *"C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile.ps1". *[[http://www.superuser.com/questions/446827/configure-the-windows-powershell-to-display-only-the-current-folder-name-in-the|SuperUser "Configure the Windows Powershell to display only the current folder name in the shell prompt"]]. *Reset. *With ISE -> See on this page, at other location. *With PowerGUI -> See on this page, at other location. *[[http://www.powershellmagazine.com/2013/08/05/pstip-reset-your-ise-runspace/|PowerShell Magazine "#PSTip Reset your ISE runspace"]] *[[http://www.powershellmagazine.com/2014/03/04/pstip-restarting-powershell-as-an-administrator/|PowerShell Magazine "#PSTip Restarting PowerShell as an administrator"]]. *[[http://www.howtogeek.com/204166/how-to-configure-windows-to-work-with-powershell-scripts-more-easily/|How-To-Geek "How to Configure Windows to Work with PowerShell Scripts More Easily"]]. *My experience with ISE "caching" of old files ( see [[http://stackoverflow.com/questions/19023648/windows-powershell-ise-running-old-version/|StackOverflow "Windows PowerShell ISE running old version"]] ): *The behaviour of ISE is different for PS modules ( .psm1 ) and simple PS scripts ( ps1 ). I am using PS&ISE with Win10Pro. *My experience with modules ( .PSM1 ) -Load a module file "hello.psm1" already placed in a proper module directory ( e.g. "C:\Users\MyUserName\Documents\WindowsPowerShell\Modules\Hello" ) by ISE. -Execute a function by "Run Selection" ( you may not execute modules by "Run Script" ). -Modify the file, e.g. the output of the function 'Write-Host "Hello World!"' to 'Write-Host "Hello"' and save the file. -Execute a function by "Run selection", and it will execute the old function, with old output, e.g. "Hello World!". This is also true if I repeat the "Run Selection" command. -Just if I leave ISE and load it again, the new function is executed by "Run Selection". *My experience with scripts ( .PS1 ). -If I execute "Run Selection", the same behaviour as with modules. -If I execute once "Run Script" and by that the function is called, the current version of the function is executed. Of course I call the function ( e.g. on line number 100 ) in the file "after" it is defined ( e.g. in lines 10-20 ). By this, there is no caching. -Especially and consequently, if I execute once "Run Script", while the executed code doesn't call the function, and then execute my function by "Run Selection", the current version of the function is executed. *Here is my workaround to make module development more comfortable: *Simple scripts may be executed by "Run script". *If I want to develop a module ( .PSM1 ), I name it as simple script ( .PS1 ) during the development phase. I place the file ( e.g. "hello.ps1" ) already in the proper module folder, e.g. "C:\Users\MyUserName\Documents\WindowsPowerShell\Modules\Hello" for a module "Hello". Of course by this I can´t execute the functions as module functions from PowerShell console. I just want to use ISE to call functions for testing. *As modules are not executed as script, there is no executable code in the file, but just functions ( AFAIK ). So I may safely execute a "Run Script" on my script. *So if I modify a module file under ISE development, I always first execute "Run Script", before I execute a function by "Run Selection". By this I always execute the current version of a function. *How to get a static variable which is not reset by calling a new PS script: *Function: $a=1 $code={ $scipt:a++ $a } GetNewClosure() *Call: "&$code" *Output: 1234567 ===== Windows Powershell Projects ====== *[[http://www.github.com/hainbloed|Github "hainbloed ( Marco Kleinert )"]]. *[[http://www.github.com/hainbloed/SQLconfig|Github "hainbloed", Project "SQLconfig"]]. ===== Windows Powershell Resources ====== ==== Microsoft ==== *[[http://wwww.microsoft.com/powershell|Microsoft Developer Network "PowerShell"]], [[http://www.github.com/powershell|GitHub "PowerShell Team"]]. *[[http://technet.microsoft.com/en-US/scriptcenter|Microsoft Script Center]]. *[[http://technet.microsoft.com/en-US/scriptcenter/dd742419.aspx|Microsoft Script Center "Windows PowerShell Scripting"]]. *[[http://gallery.technet.microsoft.com/scriptcenter|Microsoft Script Center "Script resources for IT professionals"]]. *Blog [[http://blogs.msdn.com/b/powershell/|MSDN Blogs "Windows PowerShell Blog. Automating the world one-liner at a time…"]]. *[[http://channel9.msdn.com/Series/Fortgeschrittenes-PowerShell-Scripting-fr-Administratoren|Microsoft MSDN Channel 9 "Fortgeschrittenes PowerShell Scripting für Administratoren"]], 2016-02-22. *[[http://channel9.msdn.com/Series/Fortgeschrittenes-PowerShell-Scripting-fr-Administratoren/01-Einleitung--Theorie|Microsoft MSDN Channel 9 "Fortgeschrittenes PowerShell Scripting für Administratoren - 01 Einleitung & Theorie"]]. *[[https://channel9.msdn.com/Series/Fortgeschrittenes-PowerShell-Scripting-fr-Administratoren/02-Praxisbeispiel-Module--Erweiterte-Funktionen-1|Microsoft MSDN Channel 9 "Fortgeschrittenes PowerShell Scripting für Administratoren - 02 Praxisbeispiel - Module & Erweiterte Funktionen 1"]]. *[[https://channel9.msdn.com/Series/Fortgeschrittenes-PowerShell-Scripting-fr-Administratoren/03-Praxisbeispiel-Module--Erweiterte-Funktionen-2|Microsoft MSDN Channel 9 "Fortgeschrittenes PowerShell Scripting für Administratoren - 03 Praxisbeispiel - Module & Erweiterte Funktionen 2"]]. *[[http://technet.microsoft.com/en-gb/scriptcenter|Microsoft TechNet "Script Center"]]. *[[http://technet.microsoft.com/en-gb/scriptcenter/dd742419.aspx|Microsoft TechNet "Windows PowerShell Scripting"]], [[http://www.microsoft.com/powershell|Microsoft PowerShell]]. *[[http://technet.microsoft.com/en-us/library/bb978526.aspx|Microsoft TechNet "Scripting with Windows PowerShell"]]. *[[http://msdn2.microsoft.com/en-us/library/aa830112.aspx|Microsoft MSDN Developer Network "Windows PowerShell"]] - "Windows PowerShell Getting Started Guide", "Windows PowerShell Programmer's Guide", "Windows PowerShell SDK", "PowerShell Managed Reference". *[[http://technet.microsoft.com/de-de/library/cc196356.aspx|Microsoft TechNet "Windows PowerShell-Benutzerhandbuch"]]. *[[http://technet.microsoft.com/de-de/library/ee332526.aspx|Microsoft TechNet "Wie kann ich Windows PowerShell einsetzen? Ein aufgabenbasierter Leitfaden für Windows PowerShell-Cmdlets"]]. *[[http://blogs.msdn.com/powershell/|Microsoft MSDN "Windows PowerShell Blog"]]. *[[http://blogs.msdn.com/b/powershell/archive/2008/12/30/download-windows-powershell.aspx|Windows PowerShell Blog "Download Windows PowerShell"]]. *[[http://msdn.microsoft.com/en-us/magazine/ee291628.aspx|Microsoft MSDN Magazine "Glenn Block: Managed Extensibility Framework. Building Composable Apps in .NET 4 with the Managed Extensibility Framework"]]. *"P/Invoke". *[[http://msdn.microsoft.com/en-us/library/aa446536.aspx|Microsoft Developer Network "An Introduction to P/Invoke and Marshaling on the Microsoft .NET Compact Framework"]]. *[[http://www.pinvoke.net/|PInvoke.net? - A wiki for .NET developers]]. *According to experts, PowerShell scripts might even access the Win32 API by "P/Invoke". *PowerShell does not run on W2k. *Thomas Lee. *[[http://tfl09.blogspot.com/2005/10/monad-on-windows-2000.html|Monad on Windows 2000]]. *[[http://tfl09.blogspot.com/2007/08/powershell-on-windows-2000-forget-it.html|PowerShell on Windows 2000 - Forget it]] - "... but thought I'd mention that the only thing preventing one from running PowerShell on Win2K is the fact that the installer checks the windows build. You can break open the msi with Orca and add in your build (including SP) and it works just fine". *[[http://blogs.msdn.com/powershell/|Windows PowerShell Blog]]. *[[http://blogs.msdn.com/powershell/archive/2007/05/18/the-virtuous-cycle-net-developers-using-to-powershell.aspx|Too bad, that PS isn't available on Windows 2000]]. ==== PowerShell Links for Developers ==== *[[http://msdn.microsoft.com/en-us/library/dd835506%28v=vs.85%29.aspx|Microsoft Developer Network "Windows PowerShell"]] - "Windows PowerShell Documents on MSDN". *[[http://msdn.microsoft.com/en-us/library/windows/desktop/dd835506%28v=vs.85%29.aspx|Microsoft Windows Dev-Center - Desktop "Windows PowerShell]]. *[[http://msdn.microsoft.com/en-us/library/ms714658%28VS.85%29.aspx|Microsoft Developer Network "How Windows PowerShell Works"]]. ==== Powershell Testing ==== *[[http://blogs.clariusconsulting.net/kzu/powershell-how-to-unit-test-your-cmdlet/|Daniel Cazzulino "PowerShell: how to unit test your cmdlet"]]. *[[http://www.simple-talk.com/sysadmin/powershell/|Simple-Talk. A technical journal and community hub from Redgate]]. *[[http://www.simple-talk.com/sysadmin/powershell/practical-powershell-unit-testing-getting-started/|Simple-Talk. A technical journal and community hub from Redgate "Practical PowerShell Unit-Testing: Getting Started"]]. *[[http://www.simple-talk.com/sysadmin/powershell/practical-powershell-unit-testing-mock-objects/|Simple-Talk. A technical journal and community hub from Redgate "Practical PowerShell Unit-Testing: Mock Objects"]]. *[[https://www.simple-talk.com/sysadmin/powershell/practical-powershell-unit-testing-checking-program-flow/|Simple-Talk. A technical journal and community hub from Redgate "Practical PowerShell Unit-Testing: Checking program flow"]]. *[[http://www.davidcheal.info/unit-testing-powershell/|David Cheal "Unit testing powershell"]]. *Johan Leino. *[[http://johanleino.wordpress.com/2013/09/13/pester-unit-testing-for-powershell/|Johan Leino "Pester: Unit Testing for PowerShell"]]. *[[http://johanleino.wordpress.com/2013/09/25/pester-how-to-unit-test-your-powershell-modules/|Johan Leino "Pester: How to unit test your PowerShell modules"]]. *[[http://www.powershellmagazine.com/2014/03/12/get-started-with-pester-powershell-unit-testing-framework/|PowerShell Magazine "Get started with Pester (PowerShell unit testing framework)"]]. *[[http://www.stackoverflow.com/questions/tagged/pester|StackOverflow Tagged Questions "pester"]]. *[[http://www.stackoverflow.com/questions/940497/how-to-do-tdd-and-unit-testing-in-powershell|StackOverflow "How to do TDD and unit testing in powershell?"]]. *Matt Wrock. *[[http://www.mattwrock.com/post/2012/11/15/Unit-Testing-Powershell-and-Hello-Pester.aspx|Matt Wrock's Software Development Blog "Unit Testing Powershell and Hello Pester"]]. *[[http://www.slideshare.net/mwrockx/unit-testing-powershell|Slideshare - Matt Wrock "Unit testing powershell"]] - Comparison of Pester, PSTest, PSUnit. ==== The Script Language ==== *[[http://msdn.microsoft.com/en-us/library/ms714428(v=vs.85).aspx|Microsoft Developer Network "Approved Verbs for Windows PowerShell Commands"]]. *Experts told me, that for parsing a Powershell script to provide "Lint" functionality, you must not parse the Powershell file ( as with classical "Lint", but you may use the ASL. *Example: "$$.ASL.FindAll { { $true }, true }". *[[http://www.4sysops.com/archives/powershell-bypass-executionpolicy-to-run-downloaded-scripts/|4sysops "PowerShell: Bypass ExecutionPolicy to run downloaded scripts"]]. *Microsoft. *[[http://blogs.technet.com/b/heyscriptingguy/|Microsoft Technet Blog "Hey, Scripting Guy! Blog. Learn about Windows PowerShell"]]. *[[http://blogs.technet.com/b/heyscriptingguy/archive/2011/12/07/find-the-index-number-of-a-value-in-a-powershell-array.aspx|Microsoft Technet Blog "Hey, Scripting Guy! Blog. Learn about Windows PowerShell", article "Find the Index Number of a Value in a PowerShell Array"]]. *[[http://blogs.technet.com/b/heyscriptingguy/archive/2010/03/11/hey-scripting-guy-march-11-2010.aspx|Microsoft Technet Blog "Hey, Scripting Guy! Blog. Learn about Windows PowerShell", article "Hey, Scripting Guy! How Can I Use Try/Catch/Finally in Windows PowerShell?"]]. *[[https://blogs.technet.microsoft.com/heyscriptingguy/2014/07/05/weekend-scripter-using-try-catch-finally-blocks-for-powershell-error-handling/|Microsoft Technet Blog "Hey, Scripting Guy! Blog. Learn about Windows PowerShell", article "Weekend Scripter: Using Try, Catch, Finally Blocks for PowerShell Error Handling"]]. *[[http://blogs.technet.microsoft.com/heyscriptingguy/2014/07/15/keep-your-hands-clean-use-powershell-to-glue-strings-together/|Microsoft Technet Blog "Hey, Scripting Guy! Blog. Learn about Windows PowerShell", article "Keep Your Hands Clean: Use PowerShell to Glue Strings Together"]]. *[[http://blogs.technet.microsoft.com/heyscriptingguy/2012/05/11/use-powershell-to-enumerate-registry-property-values/|Microsoft Technet Blog "Hey, Scripting Guy! Blog. Learn about Windows PowerShell", article "Use PowerShell to Enumerate Registry Property Values"]]. *[[http://technet.microsoft.com/en-us/library/hh849924.aspx|Microsoft TechNet, Script Center "Unblock-File"]]. *[[http://technet.microsoft.com/en-us/library/ee692803.aspx|Microsoft TechNet, Script Center "Windows PowerShell Tip of the Week"]]. *Casting vs. Conversion. *[[http://www.powershellatoms.com/powershell-101/casting-values-in-powershell/|Powershell Atoms "Casting Values in Powershell"]]. *[[http://www.stackoverflow.com/questions/25322636/powershell-convert-string-to-number|StackOverflow "Powershell: convert string to number"]]. *Hash tables. *[[http://web.archive.org/web/20150301000000*/http://www.powershellpro.com/powershell-tutorial-introduction/variables-arrays-hashes/|Archive.org "Powershell Pro" - "Variables, Arrays, and Hash Tables - PowerShell Tutorial 7: Accumulate, Recall, and Modify. Data"]]. *[[http://technet.microsoft.com/en-us/library/ee692803.aspx|Microsoft TechNet "Windows PowerShell Tip of the Week" - "Working with Hash Tables"]]. *[[http://www.ss64.com/ps/|SS64 Powershell - An A-Z Index of Windows PowerShell 2.0 commands]] ( - 2015-11-02 ). *[[http://www.ss64.com/ps/for.html|SS64 Powershell "For"]]. *[[http://www.ss64.com/ps/foreach.html|SS64 Powershell "ForEach"]]. *[[http://www.ss64.com/ps/write-debug.html|SS64 Powershell "Write-Debug"]]. *Modules. *[[http://www.dotnetslackers.com/|dotnetslackers.com]]. *[[http://www.dotnetslackers.com/articles/net/Converting-a-PowerShell-Script-into-a-Module.aspx|dotnetslackers.com "Converting a PowerShell Script into a Module Part"]]. *[[http://www.dotnetslackers.com/articles/net/Converting-a-PowerShell-Script-into-a-Module-part2.aspx|dotnetslackers.com "Converting a PowerShell Script into a Module Part 2"]]. *Public vs. private functions. *[[http://www.stackoverflow.com/questions/6032344/how-to-hide-helper-functions-in-powershell-modules|StackOverflow "How to hide 'Helper' Functions in Powershell Modules"]]. *Functions. *[[http://www.ss64.com/ps/syntax-function-input.html|SS64 "Function Input Processing Methods (Begin..Process..End)"]]. *[[http://technet.microsoft.com/en-us/magazine/hh413265.aspx|Microsoft TechNet "Windows PowerShell: The Advanced Function Lifecycle"]]. *[[http://technet.microsoft.com/en-us/magazine/hh360993.aspx|Microsoft TechNet "Windows PowerShell: Build a Better Function"]]. *[[http://learn-powershell.net/2013/05/07/tips-on-implementing-pipeline-support/|Learn Powershell. Achieve More "Tips on Implementing Pipeline Support"]]. *[[http://www.stackoverflow.com/questions/22687073/in-a-powershell-advanced-function-how-do-i-detect-pipeline-input-in-my-begin-bl|StackOverflow "In a Powershell advanced function, how do I detect pipeline input in my BEGIN block?"]]. *[[http://www.reddit.com/r/PowerShell/comments/2k10u2/what_cases_should_i_exclusively_you/|Reddit "R/Powershell" - Topic "What cases should I exclusively you begin/process/end?"]]. *[[http://www.stackoverflow.com/questions/12620375/how-to-return-several-items-from-a-powershell-function|StackOverflow "How to return several items from a Powershell function"]]. *Classes. *[[http://www.stackoverflow.com/questions/6848741/can-i-write-a-class-using-powershell|StackOverflow "Can I write a class using powershell?"]]. *[[http://technet.microsoft.com/en-us/library/dd315241.aspx|Microsoft TechNet "Add-Type"]]. *Comments. *[[http://www.stackoverflow.com/questions/7342597/how-do-you-comment-out-code-in-powershell|StackOverflow "How do you comment out code in PowerShell?"]]. *Line continuation. *[[http://www.stackoverflow.com/questions/3235850/how-to-enter-a-multi-line-command|StackOverflow "How to enter a multi-line command?"]]. *Shell. *[[http://www.stackoverflow.com/questions/728143/ignore-security-warning-running-script-from-command-line|StackOverflow "Ignore 'Security Warning' running script from command line"]]. *ISE. *[[http://social.technet.microsoft.com/Forums/windowsserver/en-US/7ea393bc-80db-4b92-8504-a9b481a2e266/powershell-ise-startup-script?forum=winserverpowershell|Microsoft TechNet Forums "PowerShell ISE Startup script"]]. *General & Rest. *[[http://becomelotr.wordpress.com/2012/06/17/outputtypewhy-would-you-care/|IT Pro PowerShell experience: "OutputType–why would you care?"]]. *Registry. *[[http://support.microsoft.com/en-us/kb/256986|Microsoft Support "Windows registry information for advanced users"]]. *[[http://support.microsoft.com/en-us/kb/158474|Microsoft Support "Windows TCP/IP Registry Entries"]]. *[[http://blogs.technet.microsoft.com/heyscriptingguy/2015/04/02/update-or-add-registry-key-value-with-powershell/|Microsoft Technet Blog "Hey, Scripting Guy! Blog. Learn about Windows PowerShell "Update or Add Registry Key Value with PowerShell"]]. *[[http://www.4sysops.com/archives/interacting-with-the-registry-in-powershell/|4sysops - The online community for SysAdmins and DevOps "Interacting with the Registry in PowerShell"]]. *[[http://www.myotherpcisacloud.com/post/Accessing-HKEY_USERS-With-Powershell|myotherpcisacloud.com - (Mostly) Microsoft technology, until it hurts "Accessing HKEY_USERS With Powershell"]]. *[[http://msdn.microsoft.com/en-us/powershell/scripting/getting-started/cookbooks/working-with-registry-entries|Microsoft Developer Network, PowerShell "Working with Registry Entries"]]. *[[http://msdn.microsoft.com/en-us/powershell/scripting/getting-started/cookbooks/working-with-registry-keys|Microsoft Developer Network, PowerShell "Working with Registry Keys"]]. *[[http://technet.microsoft.com/en-us/library/hh849801.aspx|Microsoft Developer Network, PowerShell "New-ItemProperty"]]. *[[http://ss64.com/ps/new-itemproperty.html|SS64 "New-ItemProperty"]]. *[[http://technet.microsoft.com/en-us/library/ee176852.aspx|Microsoft TechNet "Using the Get-ItemProperty Cmdlet"]]. *[[http://www.stackoverflow.com/questions/16318211/more-succinct-way-of-getting-a-registry-value-as-a-string-than-get-itemproperty|StackOverflow "More succinct way of getting a registry value as a string than (Get-ItemProperty $key $valueName)._VALUENAME_?"]]. *[[http://www.stackoverflow.com/questions/11471519/how-to-get-registrykey-name-alone-instead-of-full-registry-keypath|StackOverflow "How to get registryKey name alone instead of full registry keypath?"]]. *[[http://stackoverflow.com/questions/39495651/windows-10-how-to-make-new-personalisation-settings-active-immediately-by-powe|Stack Overflow "Windows 10: How to make new Personalisation settings active immediately, by PowerShell?"]] #. *Strings. *[[http://technet.microsoft.com/en-us/library/hh847757.aspx|Microsoft Developer Network, PowerShell "about_Join"]]. *Execution of commands. *[[http://wwww.stackoverflow.com/questions/26144785/powershell-netsh-automatically-run-script|StackOverflow "Powershell netsh automatically run script"]]. *SID. *[[http://www.stackoverflow.com/questions/2919286/getting-the-username-from-the-hkey-users-values|StackOverflow "Getting the Username from the HKEY_USERS values"]]. *[[http://pcsupport.about.com/od/termshm/g/hkey_users.htm|AboutTech "HKEY_USERS. Details on the HKEY_USERS Registry Hive"]]. ==== General ==== *Blog [[http://www.learn-powershell.net/|Boe Prox - Learn Powershell. Achieve More]]. *Blog [[http://blogs.msdn.com/b/powershell/|Microsoft MSDN Blog Windows PowerShell Blog]]. *[[http://www.reskit.net/powershell/|The PowerShell Information Centre]]. *[[http://www.powershellpraxis.de/|PowerShellPraxis]], Germany. *[[http://pscommunity.de/|powershell.de - PowerShell-Wissen in deutsch]]. *[[http://www.powershell.com/|PowerShell.com - The Community for PowerShell People]]. *[[http://www.powershellplus.com/|PowerShell Plus / PowerShell +]]. *[[http://www.powershellmagazine.com/|PowerShell Magazine]]. *[[http://sites.google.com/site/powershellsig/|PowerShell SIG of the North Texas PC Users Group]] - Many valuable links to PowerShell rexources. *[[http://powerscripting.wordpress.com/|PowerScripting Podcast]] - "Shownotes and links for the PowerScripting Podcast, a podcast to help people learn Windows Powershell". *Wikipedia. *[[http://en.wikipedia.org/wiki/Managed_Extensibility_Framework|EN.Wikipedia "Managed Extensibility Framework"]] - You may use it to write plugins for .NET applications. As PowerShell is a .NET application, you may do so for PowerShell too, according to experts. *[[http://en.wikipedia.org/wiki/Windows_PowerShell|EN.Wikipedia:"Windows PowerShell"]], [[http://de.wikipedia.org/wiki/Windows_PowerShell|DE.Wikipedia:"Windows PowerShell"]]. *[[http://www.microsoft.com/windowsserver2003/technologies/management/powershell/|Windows PowerShell]]. {{tag>powershell ps ps1 windows scripting }}