Git Product home page Git Product logo

powershell-docs's Introduction

ms.date
02/13/2024

PowerShell Documentation

Welcome to the PowerShell-Docs repository, the home of the official PowerShell documentation.

Microsoft Open Source Code of Conduct

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.

Build Status

live branch main branch
live-badge main-badge

PowerShell Updatable Help (CabGen) CI Build Status

Build Status

Repository Structure

The following list describes the main folders in this repository.

  • .github - contains configuration settings used by GitHub for this repository
  • .vscode - contains configuration settings and recommended extensions for Visual Studio Code (VS Code)
  • assets - contains downloadable files linked in the documentation
  • reference - contains the documentation published to learn.microsoft.com. This includes both reference and conceptual content.
    • 5.1 - contains the cmdlet reference and about topics for PowerShell 5.1
    • 7.2 - contains the cmdlet reference and about topics for PowerShell 7.2
    • 7.3 - contains the cmdlet reference and about topics for PowerShell 7.3
    • 7.4 - contains the cmdlet reference and about topics for PowerShell 7.4
    • 7.5 - contains the cmdlet reference and about topics for PowerShell 7.5
    • bread - contains the TOC used for breadcrumb navigation
    • docs-conceptual - contains the conceptual articles that are published to the Docs site. In general, the folder structure mirrors the Table of Contents (TOC).
    • includes - contains markdown include files
    • mapping - contains the version mapping configuration used by the build system
    • media - contains image files used in documentation. There are media folders throughout the docs-conceptual content. See the Contributor Guide for information on using images in documentation.
    • module - contains the markdown source for the Module Browser page
  • tests - contains the Pester tests used by the build system
  • tools - contains other tools used by the build system

NOTE: The reference content (in the numbered folders) is used to create the webpages on the Docs site as well as the updateable help used by PowerShell. The articles in the docs-conceptual folder are only published to the Docs website.

Contributing

We welcome public contributions into this repository via pull requests into the main branch. Please note that before we can accept your pull request you must sign our Contribution License Agreement. This is a one-time requirement.

For more information on contributing, read our contributor's guide. The contributor's guide contains detailed information about how to contribute documentation, suggested tools, and style and formatting requirements. Please use the Issue and Pull Request templates to help keep documentation consistent across versions.

Licenses

There are two license files for this project. The MIT License applies to the code contained in this repo. The Creative Commons license applies to the documentation.

powershell-docs's People

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-docs's Issues

Dsc Group Resource Documentation needs to explain syntax of member properties

I got the following request from a customer.

Hello,

I am attempting to use the built-in DSC Group Resource but I am finding that the documentation does not fully explain how to use the resource, and needs to be updated.

I am referring to the following page: https://msdn.microsoft.com/en-us/powershell/dsc/groupresource

https://github.com/PowerShell/PowerShell-Docs/blob/master/dsc/groupResource.md

I would like to use the Group resource to define the desired list of members for the Administrators group on my server. Unfortunately the documentation provides no syntax on how to define the values for Members, MembersToExclude or MembersToInclude. It also took me a few minutes to understand the difference between Members and MembersToInclude, so I feel more detail could be added here on why you would use one over the other. The documentation needs to show how to define a domain user, or a domain group, or a local user, or a local group and should show the proper syntax to use when defining multiple users and/or groups, as this would be a typical example.

I have brought up instances in the past where DSC documentation could be improved, and some feedback that I got from the content developers was agreement that it would make a lot of sense to ensure that example sections show syntax for how to use all of the available properties for a resource, but it doesn’t seem like much has changed yet on that front. In the case of the Group Resource, the example is not really helpful as it shows how to use the resource to ensure that a group is absent, which is not really the best first example to be showing the power of this resource to our customers.

If I can help in any way to expand this documentation out further, please let me know as I would be happy to help! :)

Thank you,

Ralph Kyttle
Microsoft ...

Add a DSC Authoring document detailing design pattern for Single Instance resources

At the moment there is no recommended design pattern for authoring DSC Resources where only a single instance can be used on a node. A method has been documented (here)[http://blogs.msdn.com/b/powershell/archive/2015/06/23/want-to-write-a-dsc-resource-where-only-a-single-instance-can-be-configured.aspx]

Could I suggest a new document is created /dsc/AuthoringResourceSingleInstance.md that contains the information @TravisEz13 provided in his blog article?

How should we deal with code snippets inside of numbered lists?

Right now, putting a code snippet inside of a numbered list breaks the numbering. Potential options include:

  • Scope listed instructions to end with code snippets (i.e. don't do that)
  • Use HTML tags?
  • Hardcode something like "Step 1" in the front of items.

Currently occurring in (at least) pullServer.md.

Secure MOF script doesn't work on WIN2012R2

Hi,
I was going through the documentation on this page:
https://github.com/PowerShell/PowerShell-Docs/blob/live/dsc/secureMOF.md

I found out that the very first script to generate the certificate does not work unless you use windows 10 or server 2016.

According to this page:
https://technet.microsoft.com/en-us/library/hh848633(v=wps.640).aspx
The -Type parameter is not valid when using the command in WIN2012R2.
I also had to specify the -CertStoreLocation parameter to make the command work.
This is what I have so far:

function CreateDscCertificate
{
    param(
        $pwd,
        $folder
    )

    if(!(Test-Path $folder))
    {
        New-Item -Path $folder -ItemType Directory
    }

    # note: These steps need to be performed in an Administrator PowerShell session
    $cert = New-SelfSignedCertificate -DnsName 'DscEncryptionCert' -CertStoreLocation cert:\LocalMachine\My

    # export the private key certificate
    $securePwd = ConvertTo-SecureString -String $pwd -Force -AsPlainText
    Export-PfxCertificate -Cert $cert -FilePath "$folder\DscPrivateKey.pfx" -Password $securePwd -Force

    # remove the private key certificate from the node but keep the public key certificate
    Export-Certificate -Cert $cert -FilePath "$folder\DscPublicKey.cer" -Force
    Remove-Item "$folder\DscPrivateKey.pfx" -Force

    Import-Certificate -FilePath "$folder\DscPublicKey.cer" -CertStoreLocation Cert:\LocalMachine\My
}

I wonder if the certificate will be valid without specifing the -type parameter...

Archive DSC Resource Slow

Hi Team,
Archive DSC resource seems to be very slow and impact is huge when you are deflating lots of files. Example- I was using it to deflate sitecore zip file which has around 10.5k files (that's not good either but that's a third party) and it took around 3-4 hours to unpack it.
Is there a way to speed this up? I can imagine this resource is doing a lot more than just unzipping hence more time.

pullServer.md should refer to PackageManagement for 3.0/4.0

Right now, guidance in pullServer.md is to manually download xPSDesiredStateConfiguration. This should be rewritten to suggest PackageManagement for 3.0/4.0.

It also should not give the impression that the zip can be downloaded from the Gallery.

Add database documentation to conformance endpoint

The conformance endpoint documentation doesn't talk about the reporting database, except to mention that it exists, and the web service reads / writes data to it.

  • Where the database runs
  • What alternative database services are supported
  • What the database schema looks like
  • How to connect to the database directly and query it

#40

Cheers,
Trevor Sullivan
Microsoft MVP: PowerShell

Investigate more nested folder structure

The folder structure currently employed is unorganized and will not scale to another order of magnitude of topics. We should look into low-hanging fruit for abstracting some of the topics into subfolders (e.g. built-in resources should go in a single folder).

enactingconfigurations needs some help

  1. as reported by MVPs, DSC extension should not be a relevant example for pull mode.
  2. I need to tweak the graphics a bit to be more inline with what we use for presentations.

Module folder name should match with base module name

Please remove ‘s’ from module folder name ‘MyDscResources’
Resource will not be discovered by DSC if user follows exactly what is written in the document.

$env: psmodulepath (folder)
|- MyDscResources (folder)
|- MyDscResource.psm1
MyDscResource.psd1

Style guide

There's currently some inconsistencies in the way Markdown is authored in this repository, but we should coalesce on a single style guide, including guidance for:

  • indentation
    • vs _
  • extra carriage returns (e.g. underneath headers, when a line gets too long, etc.)
  • when to use bold, italic, code highlighting, etc.

Typo + Suggestions

https://msdn.microsoft.com/en-us/powershell/dsc/pullServer

You use this:
configuration Sample_xDscWebService

But in the next section you tell the user to call this:
Sample_xDSCService

Might suggest adding in the option to use "AllowUnencryptedTraffic". Although not recommended, it is a valid configuration.

You also don't specify to run a Start-DscConfiguration command after creating the MOF. Someone creating a pull server for the first time might get confused with the lack of that step.

Add documentation for scenario where pull server is also the reporting server

Current documentation around v5 pull server uses the example of a report server separate from the pull server. Given the changes from v4 it would be beneficial to have an example of how to configure a pull server to also be the report server and resource server.

Also, if the pull server URI is the same for the report server, then I suppose there should be something documented for the reporting code. i.e. if you're using a single server you use http://pullserver:8080/PSDSCPullServer.svc, if you're using 2 servers use http://reportserver:8080/PSDSCReportServer.svc.

LocalConfigurationManager DebugMode definition is incorrect

I'm running WMF 5.0 Production Preview.
If i use

        LocalConfigurationManager 
        { 
            DebugMode = $true
        } 

You get unsupported value error message:

PSDesiredStateConfiguration\LocalConfigurationManager : 
At least one of the values 'True' is not supported or valid for property 'DebugMode' on class 'LocalConfigurationManager'. 
Please specify only supported values:
None, ForceModuleImport, All.

DebugMode is no longer Bool value, it is string with possible 3 options: None, ForceModuleImport, All

This should be updated to match current version.

Class based DSC resource

In New language features in PowerShell 5.0
https://msdn.microsoft.com/en-us/powershell/wmf/class_newtype

It states:
Four new attributes, DscResource, DscResourceKey, DscResourceMandatory, and DscResourceOut have been added.

In Class-based DSC Resources
https://msdn.microsoft.com/en-us/powershell/wmf/dsc_classbasedresource

The example shows usage of
DscProperty(Key), DscProperty(Mandatory) and I assume there would have been a
DSCProperty(Out) but its not implemented in the example.

On the same subject, the example also shows usage of DscProperty(NotConfigurable) but theres no mention of it on the first link.

Add DSC Credential Encryption guidance document

This was raised by @TravisEz13 in this DSCResources issue.

I have completed the document as suggested by @TravisEz13 based on his blog post.

It should complete task 1:

"We should create a doc on best practices for securing the environment. The first version could be based on the blog and should be put in PowerShell-Docs/Dsc (this is the proper location because this is a general DSC best practice) documentation (e.g. https://github.com/PowerShell/PowerShell-Docs/blob/master/dsc/configDataCredentials.md)"

I will submit the PR for this shortly.

Contributing.md suggests tagging new issues as "In Progress" but only PowerShell org members can label issues.

In Contributing.md it is suggested that new issues are tagged with "In Progress":

  • Open a new issue tagged as "in progress" to tell others what you're working on

However, only members of the organization that owns the repository can tag (label) issues. So, only members of the PowerShell org can tag (label) new issues or PR's. This suggestion should be clarified to prevent confusion.

Also, "tagged" should be changed to "labeled" to match what GitHub calls tags.

I didn't tag this issue as "In Progress", because I can't, but it is "In Progress". 😄

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.