Git Product home page Git Product logo

powershell's Introduction

logo PowerShell

Welcome to the PowerShell GitHub Community! PowerShell is a cross-platform (Windows, Linux, and macOS) automation and configuration tool/framework that works well with your existing tools and is optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. It includes a command-line shell, an associated scripting language, and a framework for processing cmdlets.

Windows PowerShell vs. PowerShell Core

Although this repository started as a fork of the Windows PowerShell codebase, changes made in this repository are not automatically ported back to Windows PowerShell 5.1. This also means that issues tracked here are only for PowerShell Core 6 and higher. Windows PowerShell specific issues should be reported with the Feedback Hub app, by choosing "Apps > PowerShell" in the category.

New to PowerShell?

If you are new to PowerShell and want to learn more, we recommend reviewing the getting started documentation.

Get PowerShell

You can download and install a PowerShell package for any of the following platforms.

Supported Platform Download (LTS) Downloads (stable) Downloads (preview) How to Install
Windows (x64) .msi .msi .msi Instructions
Windows (x86) .msi .msi .msi Instructions
Ubuntu 22.04 .deb .deb .deb Instructions
Ubuntu 20.04 .deb .deb .deb Instructions
Ubuntu 18.04 .deb .deb .deb Instructions
Ubuntu 16.04 .deb N/A N/A Instructions
Debian 10 .deb .deb .deb Instructions
Debian 11 .deb .deb .deb
CentOS 7 .rpm .rpm .rpm Instructions
CentOS 8 .rpm .rpm .rpm
Red Hat Enterprise Linux 7 .rpm .rpm .rpm Instructions
openSUSE 42.3 .rpm .rpm .rpm Instructions
Fedora 35 .rpm .rpm .rpm Instructions
macOS 10.13+ (x64) .pkg .pkg .pkg Instructions
macOS 11+ (arm64) .pkg .pkg .pkg Instructions
Docker Instructions

You can download and install a PowerShell package for any of the following platforms, which are supported by the community.

Platform Downloads (stable) Downloads (preview) How to Install
Arch Linux Instructions
Kali Linux .deb .deb Instructions
Many Linux distributions Snapcraft Snapcraft

You can also download the PowerShell binary archives for Windows, macOS, and Linux.

Platform Downloads (stable) Downloads (preview) How to Install
Windows 32-bit/64-bit 32-bit/64-bit Instructions
macOS (x64) 64-bit 64-bit Instructions
macOS (arm64) 64-bit 64-bit Instructions
Linux 64-bit 64-bit Instructions
Windows (ARM) 64-bit (preview) 64-bit Instructions
Raspbian (ARM) 32-bit/64-bit 32-bit/64-bit Instructions

To install a specific version, visit releases.

Upgrading PowerShell

For best results when upgrading, you should use the same install method you used when you first installed PowerShell. The update method will be different for each platform and install method. For more information, see Installing PowerShell.

Community Dashboard

Dashboard with visualizations for community contributions and project status using PowerShell, Azure, and PowerBI.

For more information on how and why we built this dashboard, check out this blog post.

Discussions

GitHub Discussions is a feature to enable free and open discussions within the community for topics that are not related to code, unlike issues.

This is an experiment we are trying in our repositories, to see if it helps move discussions out of issues so that issues remain actionable by the team or members of the community. There should be no expectation that PowerShell team members are regular participants in these discussions. Individual PowerShell team members may choose to participate in discussions, but the expectation is that community members help drive discussions so that team members can focus on issues.

Create or join a discussion.

Chat

Want to chat with other members of the PowerShell community?

There are dozens of topic-specific channels on our community-driven PowerShell Virtual User Group, which you can join on:

Add-ons and libraries

Awesome PowerShell has a great curated list of add-ons and resources.

Building the Repository

Linux Windows macOS
Instructions Instructions Instructions

If you have any problems building, consult the developer FAQ.

Build status of nightly builds

Azure CI (Windows) Azure CI (Linux) Azure CI (macOS) CodeFactor Grade
windows-nightly-image linux-nightly-image macOS-nightly-image cf-image

Downloading the Source Code

You can clone the repository:

git clone https://github.com/PowerShell/PowerShell.git

For more information, see working with the PowerShell repository.

Developing and Contributing

Please look into the Contribution Guide to know how to develop and contribute. If you are developing .NET Core C# applications targeting PowerShell Core, check out our FAQ to learn more about the PowerShell SDK NuGet package.

Also, make sure to check out our PowerShell-RFC repository for request-for-comments (RFC) documents to submit and give comments on proposed and future designs.

Support

For support, see the Support Section.

Legal and Licensing

PowerShell is licensed under the MIT license.

Windows Docker Files and Images

License: By requesting and using the Container OS Image for Windows containers, you acknowledge, understand, and consent to the Supplemental License Terms available on Docker Hub:

Telemetry

Please visit our about_Telemetry topic to read details about telemetry gathered by PowerShell.

Governance

The governance policy for the PowerShell project is described here.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

powershell's People

Contributors

adityapatwardhan avatar andyleejordan avatar anmenaga avatar bergmeister avatar carlotoso avatar daxian-dbw avatar dependabot-preview[bot] avatar dependabot[bot] avatar isazonov avatar jameswtruher avatar jianyunt avatar jsoref avatar jumpingyang001 avatar lzybkr avatar markekraus avatar martingc94 avatar mirichmo avatar mspeterhon avatar palladia avatar paulhigin avatar powercode avatar powershellteam avatar raghushantha avatar rdil avatar rjmholt avatar stevel-msft avatar travisez13 avatar vors avatar xtqqczze avatar zach-folwick avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

powershell's Issues

monad-native: IsHardLink

Zach according to my research, every file name is a hard link to an actual file. The only question is whether or not it is the first original file name. source http unix.stackexchange.com questions 122333 how to tell which file is original if hard link is created That being said, users should be able to tell if a file name points to a file that has additional files pointing to it. isHardLink will always return true when given a file. find . samefile returns the other filenames that point to the same reference the context being the same directory or in any subdirectory . Pete's resources http linuxcommando.blogspot.com 2008 09 how to find and delete all hard links.html Current failed implementation https msostc.visualstudio.com DefaultCollection PS _git monad native pullrequest 131 Native function is used in CorePsPlatform, but is actually called from src monad linux src monad monad src namespaces FileSystemProvider.cs internal static bool IsHardLink ref IntPtr handle VSO create date - 3/19/2015 15:00:00 VSO closed date - 10/27/2015 11:25:00

monad-linux: CommandLineToArgvW (C#)

x implement in C# x place code in monad x place unit tests in monad linux https msdn.microsoft.com en us library windows desktop bb776391%28v=vs.85%29.aspx https msdn.microsoft.com en us library windows desktop 17w5ykft%28v=vs.85%29.aspx We need to determine if we have to implement this in native code, or at all for that matter. VSO create date - 3/10/2015 18:26:00 VSO closed date - 10/9/2015 13:03:00

Fix monad/native pal.h to use correct types from stdint.h

This work item is about replacing C types like int, unsigned int, short, long,... by their counterparts with fixed bit length, e.g. int32_t, uint32_t, int16_t, int64_t,... https github.com dotnet corefx blob master Documentation coding guidelines interop guidelines.md VSO create date - 6/18/2015 13:18:00 VSO closed date - 11/3/2015 14:06:00

Sync Source Depot to Git repo

This is owned by Krishna from the PS team. Workaround in place: GitSD sync under Andy's user on Andy's box. NOT a permanent solution. The PSW team is moving to Git in three to four months.

VSO create date - 4/23/2015 11:31:00

Requirements:

  • Daily sync so we can integrate more frequently with the other PowerShell teams
  • Available as a (private) repo on GitHub (replacing psl-monad)
  • We need at least the monad/src folder that was in the admin depot
  • We may want to sync all of monad for FullCLR to use dotnet-cli
  • We also need wmi/WMIv2/Client/DotNetAPI/cs, but nothing else in WMI

FindNextFile

managed API available VSO create date - 3/10/2015 18:30:00

Replace Platform.IsLinux() by feature-based platform implementation selection

steps check code formatting 4 space tabs done add inline attribute to Win* function replace IsLinux by feature query add unit test for linux code path * if it has code, test all code * if it just returns = it's a void function > check that it does or doesn't throw * if it returns a hardcoded value check for that value && that it doesn't throw files src utils ExtensionMethods.cs done src security SecuritySupport.cs done src singleshell config MshSnapinInfo.cs done src engine Modules ModuleIntrinsics.cs bug src engine PSVersionInfo.cs bug src engine remoting commands remotingcommandutil.cs bug #63 src engine SessionStateDriveAPIs.cs needs test #66 src CoreCLR CorePsExtensions.cs part of #67 src engine runtime Binding Binders.cs done src namespaces FileSystemProvider.cs item #70 src namespaces RegistryProvider.cs done src namespaces LocationGlobber.cs item #71 Only remaining uses of IsLinux are as !IsLinux in the feature queries themselves, and the FileSystemProvider see #70 . VSO create date - 6/3/2015 15:45:00 VSO closed date - 8/4/2015 15:39:00

Investigate why the processor architecture cannot be supplied in MshSnapinInfo.cs

File monad src singleshell config MshSnapinInfo.cs Function static internal PSSnapInInfo ReadCoreEngineSnapIn Per the source code Hardcoding the architecture MSIL as PowerShell assemblies are architecture neutral, this should be changed if the assumption is broken. Preferred hardcoded string to using for perf reasons string architecture = currentAssembly.GetName .ProcessorArchitecture.ToString That is, the PowerShell team made the decision that the reported architecture is always MSIL since their assemblies are architecture neutral. VSO create date - 6/15/2015 11:14:00 VSO closed date - 9/4/2015 14:44:00

GetComputerName

VSO create date - 3/10/2015 18:30:00 VSO closed date - 8/25/2015 10:21:00

monad-native: CreateHardLink

x function and tests created zach but not for intptr code reviewed why does this function even exist since unix filesystem requires all files to be a hard link? This seems like a p invoke for new item?? There is a note somewhere in the comments CorePsPlatform.cs? to get the inode # count. VSO create date - 3/10/2015 18:27:00

Handle infrastructure and CloseHandle

Implement the infrastructure to create handles and close them, including the CloseHandle API This must be compatible to the SafeHandle classes e.g. SafeFileHandle from .net https msdn.microsoft.com en us library microsoft.win32.safehandles.safefilehandle v=vs.110 .aspx This could be impossible to solve in a way where it's compatible with SafeFileHandle, because .net provides similar functionality internally. This is kind of similar to errno in feature overlap with CoreCLR. VSO create date - 3/10/2015 18:26:00

automatically generate makefile for assembly load context

The Makefile is being automatically generated, but makegen silently drops two source files because they exist in the $ objdir and don't actually exist on the system. Those files are currently stubbed in monad linux, but should also come from Windows. The files aren't going to come from Windows. We'll have to make stub targets. This is pretty low priority. Will come after integration with PSW team. This should happen automagically with the switch to DNVM, that is, since the build system itself will change, it'll become trivial to build this as it should be built from the stubs. VSO create date - 6/4/2015 12:40:00

rename and split dotnetlibs into build-release and build-debug

$ BUILD RELEASE $ BUILD DEBUG $ POWERSHELL $ XUNIT With the recent changes from other work items to restructure the build output folders, dotnetlibs only contains PowerShell build artifacts at the moment, and everything else is copied to exec_env * subfolders directly, so this is not needed anymore. VSO create date - 6/10/2015 14:04:00

Meta: add tests for source changes

this item was removed, because we already did most of this work through smaller subitems VSO create date - 6/3/2015 15:45:00 VSO closed date - 8/3/2015 2:52:00

Use xUnit runner to collect and execute unit tests

xUnit runner fails to load reference assemblies because it attempts to load them by a strong name without a version string, which CoreCLR's corerun then disallows ? or in some way fails . xUnit cannot load a reference assembly from outside the platform assemblies. Waiting on response from CoreCLR team. VSO create date - 6/8/2015 14:05:00 VSO closed date - 7/20/2015 16:09:00

[BLOCKED] GetSymbolicLinkTarget

WCHAR GetSymbolicLinkTarget WCHAR We're blocked on this since we don't have enough information or documentation. See monad native PR #130 VSO create date - 3/19/2015 15:04:00

pinvoke: GetUserName

linux pinvoke that returns the username of the user logged in and running the process This will be used in the fixing of monad src CoreCLR CorePsExtensions.cs VSO create date - 6/16/2015 14:17:00 VSO closed date - 8/10/2015 13:51:00

Replace TargetingPack folder with nuget prepare step

The CoreFx repo downloads the reference assemblies for Core .net during it's windows build. It uses nuget internally. Use the same nuget mechanism to fetch those reference assemblies instead of using the ones from the monad ext repo. The reference assemblies for .net are stored in src monad ext coreclr TargetingPack relative to the monad linux repo This is currently blocked by CoreCLR providing packages that can be consumed The reference assemblies cannot be built by an open source tool, so we can't automate the building and usage of CoreCLR and CoreFX, which leaves us tied to ProjectK, instead of the open source GitHub hosted codebase. VSO create date - 6/8/2015 14:48:00 VSO closed date - 12/17/2015 11:50:00

Fix `help` alias

While the get-help cmdlet works, it's usual alias help does not (claims platform is not supported).

Add smoke tests in C# for all of the utility Cmdlets

see excel sheet for cmdlets that should work http sharepoint sites SCX Team%20Documents Magrathea CmdletEval.xlsx?d=w44dbcbe2af694575a4bdd111c10b3015 Probably best to have a single xunit unit test that starts a pester script from C#, and the pester script implements the smoke tests Pester https github.com pester Pester Some samples for the smoke tests would be x get process tracked via item 119 x get alias x ls x get item VSO create date - 6/11/2015 17:00:00 VSO closed date - 7/24/2015 11:30:00

See why script errors are not correctly reported to console, they are only reported to trace output

Good example is this Example #1 Input Command ThatDoesNotExist This should result in an error message visible in the console output. Example #2 Input Import Module PowerShell.Commands.Utility Get Location ParamThatDoesNotExist This should result in an error message visible in the console output. Update the root problem was the console we had wasn't catching all the exceptions, but this got fixed for free when we rewrote the console. VSO create date - 6/5/2015 10:46:00 VSO closed date - 7/6/2015 12:53:00

Add unit test for SessionStateInternal.Drives()

Need a testable mock of a PowerShell instance to test this, as it's a non static method in src engine SessionStateDriveAPIs.cs , where the class constructor requires too much info. Could now probably be done using Pester. VSO create date - 6/15/2015 15:20:00

Expose the Management.Infrastructure API

Specifically this is Microsoft.Management.Infrastructure.Native.dll, which is blocking DSC work (barring our work-around using omicli).

VSO create date - 6/3/2015 15:46:00

automate copying CoreCLR/CoreFx from myget

instead of using the build share get it from myget similar to how msbuild grabs it in the corefx project https www.myget.org F dotnet core this requires nuget 3.0 beta VSO create date - 4/23/2015 11:31:00 VSO closed date - 12/17/2015 11:47:00

Update readme

Need to update the readme for the move to GitHub and reorganization of the tree.

CreateSymbolicLink

Required for NewItem -SymbolicLink, otherwise throws:

new-item -type SymbolicLink -name foo -target build.sh
new-item : NewItemIOError
At line:1 char:1
+ new-item -type SymbolicLink -name foo -target build.sh
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceExists: (/Users/andrew/src/PowerShell/foo:String) [New-Item], IOException
    + FullyQualifiedErrorId : NewItemIOError,Microsoft.PowerShell.Commands.NewItemCommand

Tests required as well.

FindClose

managed API available VSO create date - 3/10/2015 18:29:00

get ramweb access for pslsrv

this is not needed anymore, the PS team will take over the SD to git sync VSO create date - 5/11/2015 10:35:00

GetCPInfo

VSO create date - 3/10/2015 18:30:00 VSO closed date - 8/28/2015 16:01:00

Add command line option to Main to enable trace logging, add trace logging

Talk to PowerShell team on how to enable trace logs the correct way, maybe this is just some configuration option or cmdlet that needs to be called. Fixing correctly Pull in https www.nuget.org packages System.Diagnostics.TraceSource 4.0.0 beta 23409 as our build does not contain the correct references. Usage set psdebug trace 2 https technet.microsoft.com library 2517a4da 2468 4148 aca3 50a6d7df4a10 v=wps.630 .aspx This really doesn't need to be added to Main or anything, just use the cmdlet. This is how we added traces so far how to hack enable tracing in the PSTraceSource ctor set flags to PSTraceSourceOptions.All add WriteLine diff git a monad src utils StructuredTraceSource.cs b monad src utils StructuredTraceSource.cs index c81b8af2d..5778ad132 100644 a monad src utils StructuredTraceSource.cs b monad src utils StructuredTraceSource.cs @@ 326,6 326,7 @@ namespace System.Management.Automation flags = PSTraceSourceOptions.None; #endif flags = PSTraceSourceOptions.All;^M #if !CORECLR System.AppDomain is not in ProjectK. @@ 1009,7 1010,7 @@ namespace System.Management.Automation finally trace the output OutputLine flag, output.ToString ; Console.WriteLine output.ToString ;^M catch VSO create date - 6/15/2015 9:51:00 VSO closed date - 10/21/2015 19:16:00

Fix GetBuildVersion() in monad's PSVersionInfo

This is a dupe of 108 It should work with the latest CoreCLR; it doesn't not work currently, so CoreCLR dependency needs to be updated. File src engine PSVersionInfo.cs Function static internal Version GetBuildVersion Unhandled Exception System.ArgumentException Version string portion was too short or too long. at System.Version.VersionResult.SetFailure ParseFailureKind failure, String argument at System.Version.TryParseVersion String version, VersionResult& result at System.Version.Parse String input at System.Version..ctor String version at System.Management.Automation.PSVersionInfo.GetBuildVersion that could also be us now, because our version is 0.0.0.0 VSO create date - 6/15/2015 13:28:00

FindFirstFile

managed API available VSO create date - 3/10/2015 18:29:00

Update Jenkins

Jenkins needs to be told the new locations of the repositories.

Import issues from VSO

Need to import our backlog of issues from VSO.

We can link an Excel spreadsheet to the VSO team to get the issues, then export to CSV, and import to GitHub using Octokit.

IsSymbolicLink

basically a duplicate of isHardLink VSO create date - 3/19/2015 15:00:00 VSO closed date - 1/6/2016 9:11:00

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.