Skip to content

Commit 6aed37d

Browse files
joeyaielloSean Wheeler
authored and
Sean Wheeler
committed
Merge latest staging to live (#2029)
* Update the example of `Where-Object -IsNot` (#1841) * Update Example 5 in Group-Object.md (#1845) * removing @{Text=} tags * fixing UTF8 characters * removed empty H3 * added H3 for input and output types * removed mangled UTF8 character * updating Out-* commands with -NoNewLine per Issue 1739 * Fix the example of `Format-Table -DisplayError` (#1848) The example is a `-DisplayError` parameter example. But it uses `-ShowError` parameter. * Fix the example of `Format-Wide -DisplayError` (#1850) * Fix the example of `Format-Custom -DisplayError` (#1849) The example is a -DisplayError parameter example. But it uses -ShowError parameter. * updating set-acl docs per PR#901 * using semantic link breaks * Fix the example of `Format-Wide -ShowError` (#1851) * Fixed Test-ScriptFileInfo example (#1852) * fixing issue 1768 * Formatting, example fix for Body parameter (#1847) 1. Replaced variable names with PascalCase convention and for consistency 2. Removed directory information [c:\] in the examples 3. Put powershell keyword for formatting examples 4. Replaced Invoke-RestMethod with Invoke-WebRequest in the Body example, added method Post 5. Removed InformationAction and InformationVariable parameters, which were mistakenly a copy of Body, included already in CommonVariables part * fixing style consistency across articles * Fix example numbers in Resume-Job.md (#1857) Example 4 is duplicated. * Fixes typo $WebSiteName in separatingEnvData.md (#1856) - Adds the website name to common node property inside configuration data. - Also, it is now referenced (e.g. $Node.WebSiteName) in the DSC configuration document in MyWebApp.ps1. * Updates configurations.md (#1855) Two set of changes made. - Example scripts e.g. MyDscConfiguration.ps1 define the configuration inside them and call the configuration at the end line. Removed the call to the configuration at the end. Since the article demonstrates dot-sourcing the file and calling the configuration explicitly. - Fixed typo in the file name (TEST-PC1.mof to localhost.mof ), since the ComputerName was not specified it should default to using 'localhost' as the default argument for it. P.S. - There is a comment on the web-page regarding the fixes made * Fix typo in comment (#1854) * Updating the help content for v6. (#1853) * Updating the help content for v6. * Address code review comments * Fix broken links * Fix example numbers in about_Transactions.md (#1859) Example number '7' is duplicated. * Update Alias-Provider.md (#1831) 1. Removed statement that an alias is to an executable, the definition cotnains the path. It may - but does not need to be. For example: Try Set-Alias np Notepad then look at the definition. 2. Clarified that an alias can also be to a powershell script (ps1 file). 3. Tidied up the language removing multiple 'And,' clauses to improve readability. * Add documentation of new -AsHashtable switch for ConvertFrom-Json introduced by PR #5043 (#1858) * add documentation of new -AsHashTable switch for ConvertFrom-Json and also document the behaviour in case of duplicate strings. * correct casing of -AsHashtable switch. * Address PR comments about -AsHashtable switch for ConvertFrom-Json.md * Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md * Revert "Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md" Accidentally change the wrong field. This reverts commit 6e76191. * Accept pipeline input: False for -AsHashtable switch in ConvertFrom-Json.md * Fix example numbers in Invoke-WebRequest.md (#1862) Example number '4' is duplicated. * reformatting and integrating changes from PR#1831 (#1860) * Fix example numbers in Get-Help.md (#1869) Example number 12 and 13 are missing. * Fix example numbers in Import-Module.md (#1868) Example number '10' is duplicated. * Fix example number in ConvertTo-Html.html (#1867) Example number '10' is duplicated. * Update dscCiCd.md (#1865) Missing a period on line 378. Should be `$(Build.ArtifactStagingDirectory)\` not `$(BuildArtifactStagingDirectory)\`. * Web Cmdlets 6.0.0 Documentation Refresh (#1870) * Web Cmdlets 6.0.0 Documentation Refresh * Address PR Feedback * Merge Example 4 and 5 in Get-Member.md (#1874) Example 4 and 5 in Get-Member.md v3.0 and v4.0 are almost the same. They should be merged as with v5.0. * Remove hash algorithms unsupported in v6.0 (#1873) MACTripleDES and RIPEMD160 are no longer supported in v6.0. * Update outputs of Get-Verb (#1872) Since v6.0, `Get-Verb` returns not MemberDefinition but VerbInfo that has Verb and Group properties. * Fix typo in ConvertTo-Html.md (UTF-x) (#1879) * Fix "Accept wildcard characters" in Get-Service.md v6 (#1878) * Fixed "False" -> "True" (`DisplayName`, `Exclude`, `Include`, and `Name`) * Removed `InformationAction` and `InformationVariable` * Fixed Get-WindowsFeature cmdlet HyperLink (#1877) * Fixed Get-WindowsFeature cmdlet HyperLink Minor edit. Update Get-WindowsFeature cmdlet HyperLink to https://technet.microsoft.com/library/jj205469(v=wps.630).aspx * Changed URL to new docs.microsoft.com location The TechNet URL did not work. TechNet and MSDN are being retired. * Update Get-WinEvent.md (#1876) Removed future tense in a couple of places to improve readability. Minor edit. * Update Example 8 in Get-Process.md (find the owner of a process) (#1875) * Update Example 8 in Get-Process.md (Find the owner of a process) * Update to attempt to avoid build errors It seems that the build system does not accept multiple script blocks per one Example header. * updated localmachine\Root to LocalMachine\My (#1880) The example where we import the PFX on the target node should import the cert into Personal store and not root. * Update Group property example in Get-Verb.md (#1881) * adding missing space (#1885) * removing stray character (#1886) * Update Example 9 in Get-Process.md (#1888) * powershell -> pwsh (only v6.0) * Windows PowerShell -> PowerShell * Remove "About ISE" files of v6.0 (#1891) * Remove "About ISE" files of v6.0 ISE is no longer bundled with PowerShell 6.0. * Remove links for "About ISE" files of v6.0 * Update Get-Process.md (#1890) Fixed name parameter details to show it accepts wildcards in the name * Update productincompat.md (#1892) The list of compatible systems should include Skype For Business Server 2015 and Lync Server 2013. * Update unapproved verbs examples in Get-Verb.md (#1896) * Updated Example 4 * Removed Example 5 * Removing extra space in the Example 5A script (#1894) It was highlighting as string in the documentation, I was trying to remove all the extra space. * fixing merge conflict * updates to style and contrib * tweak format * tweak format 2 * fix typo * fix number list example * adding review feedback * fix broken links * incorporating feedback from zach * reformatting About_* for 80 columns - part 1 * reformat about_* * reformatting About_* topics - Part 2 * fixing broken links * fixing more broken links * more broken links fixed * Fix parameter's position in Get-Random.md (#1901) * Fix parameter's position in Measure-Command.md (#1905) * Fix parameter's position in Trace-Command.md (#1904) * Actually call the configuration in the example (#1906) On line 74, it says... "The last line of the example containing only the name of the configuration, calls the configuration." This change actually makes that call. * reformatting About_* for 80 columns - part 3 (#1902) * reformatting About_* * reformatting About_* part 3 * fixing broken links * fixing more broken links * one more time with the links * reformatting About_* for 80 columns - part 4 * Adding PreRelease versioning info for PSGallery & PSGet (#1903) * PowerShellGet PreRelease Support Adding descriptive doc for pre-release versioning support * Correcting typos in pre-release doc Minor typos and case issues fixed * Updated prerelease info based on feedback Mostly cosmetic updates. Functional change: added line 28, stating we only support 3-segment module versions. * Adding prerelease to module install update find save commands * Updating PSGet -Script commands for Prerelease support * Hyphen listed as optional rather than preferred in Prereleasestring * Minor corrections from Rebro review * Addressing @sdwheeler feedback on links and double slashes * Fixing broken link * Update PreReleaseScript.md * Style tweaks in STYLE.md (#1913) * Fix YAML metadata on "Understanding Concepts" (#1911) I'm not quite sure what this means, but it certainly looks terrible on docs.microsoft.com when it's malformed. (To be perfectly honest, I only managed to even figure out it's called "YAML metadata" by peeking at the DOM of github's HTML.) * Fix parameter's position in Join-Path.md (#1909) * typo correction on line 85 (#1916) E:\Windows\Sytem32 sould be E:\Windows\System32 * Fix parameter's position in Get-TraceSource.md (#1917) * Changed required PSGet version to 1.6.0 (#1920) * Update Example 5 in Get-Process.md (#1923) * fixing backlashes reported in PR1921 (#1924) * fixing backlashes reported in PR1921 * found more backslashes * reformatting About_* for 80 columns - part 5 * reformatting About_* for 80 columns - part 6 * incorporating review feedback * reformatting About_* for 80 columns - part 7 * Fixed formatting of output per issue #808 * Fix typo in syntax description (#1931) * Fix parameter's position in ConvertTo-Xml.md (#1929) * Remove descriptions about ComputerName parameter in Get-Process.md v6.0 (#1928) * Line 192 Single Quote Breaks Example (#1930) * Line 192 Single Quote Breaks Example * clarified the example for -Regex * Update Example 2 in Get-Alias.md (ineffective Exclude) (#1935) `-Exclude Get-*` is ineffective because there are no aliases that begin with `Get-`. * Fix formatting: DESCRIPTION section in ConvertTo-Xml.md (#1934) * Fix typo in Unregister-ScheduledJob (#1932) * Update Unregister-ScheduledJob.md * Update Unregister-ScheduledJob.md * Update Unregister-ScheduledJob.md * Update Unregister-ScheduledJob.md * Fix parameter's position in ConvertFrom-Csv.md (#1937) * fix typo on metaConfig.md (#1936) fixed typo * Quick edits (#1938) * Changed required PSGet version to 1.6.0 * Fixes to PSGet TOC and WMF 5.1 compat page * Update Get-Item.md (#1942) Proof-read some of the examples. The first two were wrong entirely: The user must be in the ps-test folder for the result shown to happen. * Add description about Format-Hex -InputObject (#1939) * Fix parameter's position in Add-Member.md (#1946) * Fix parameter's position in Select-Object.md (#1945) * Correcting add to hash table example (#1944) * Update about_Hash_Tables.md corrected add to hash table example in 3.0 * Update about_Hash_Tables.md corrected add to hash table examples in 4.0 * Update about_Hash_Tables.md corrected add to hash table example in 5.0 * Update about_Hash_Tables.md corrected add to hash table example in 5.1 * Update about_Hash_Tables.md corrected add to hash table example in 6 * Fix Set-TraceSource -ListenerOption parameter (#1949) * Fixed the value of "Accepted values:" * Fixed minor differences in formatting and wording * Fix Trace-Command -ListenerOption parameter (#1948) * Fixed the value of "Accepted values:" * Fixed minor differences in formatting and wording * Fix parameter's position in Select-Xml.md (#1953) * Fix Get-Alias -Name parameter (#1952) * Position: 0 * Default value: All aliases * Accept wildcard characters: True * Fixed minor differences in formatting and wording And also removed InformationAction/InformationVariable in v6.0. * Wmf 5.1 cleanup (#1950) * Changed required PSGet version to 1.6.0 * Fixes to PSGet TOC and WMF 5.1 compat page * Add note explaining WMF does not ship in Windows * Typo fix ("you will are not" -> "you will not"). (#1951) * Typo fix ("you will are not" -> "you will not"). * Changed from passive voice to active voice * added article about formatting code samples * fixing typos * fixed typos and incorporated feedback * updating metadata tags in docfx.json * fixing filename spelling * Fix parameter's position in Get-Content.md (#1959) * Fix parameter's position in Get-Member.md (#1958) * Update PSGallery "Items Tab" (for the new prerelease feature) (#1957) * Fix link for about_WorkflowCommonParameters in New-PSWorkflowExecutionOption.md (#1962) * Fix link for about_Types.ps1xml in Update-TypeData.md (#1961) * Fix parameter's position in Group-Object.md (#1966) * Fix hex values in about_Arithmetic_Operators.md (#1965) * Indent headers as subheaders (#1967) * Update minor typo in Limit-EventLog.md (#1968) * Update Example 3 in Get-FileHash.md (#1969) * Fix parameter's position in Tee-Object.md (#1970) * fixing output example per issue 1933 * fix -Path metadata to reflect wildcard support * fixing issue 1640 * fixing issue 1651 * Fix link for about_Remote_Requirements (#1976) * Split parameter set in Sort-Object.md v6.0 (#1975) Since v6.0, Sort-Object cmdlet has two parameter sets, "Default" and "Bottom". * Fix link for about_Preference_Variables (#1982) http://... -> relative path * Fix broken headers in Get-CimSession.md v6.0 (#1981) * Update Example 1 in Import-Counter.md (#1980) * move $OFS to prefs article added note about read-only (#1978) * Update decisionMaker.md (#1984) Slight, but critical corrections to the definition of DevOps. * Update configurations.md (#1985) * Fix parameter's position in Restart-Service.md (#1993) * Fix link for logical operators in about_Operator_Precedence.md (#1992) * Update scriptResource.md (#1986) Match specified GetScript rule * Bad link (#1988) The link "http://go.microsoft.com/fwlink/?LinkId=119096" is supposed to point to a page or a document about "Code-Signing Best Practices". However, it points to a video about "Understanding Extension INFs and Component INFs". I watched the whole video and there is nothing inside about "Code-Signing Best Practices". The best match I have found is the following one: http://download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b18336565f5b/best_practices.doc It would be a very good idea to make a web page from this document. Pieces of advice it contains are still accurate. * Update Example 1 of Protect-CmsMessage (#1987) The existing example did not specify you needed to create the INF. This not only says so but does so using a script block piped to out-file * Small edits for mispellings (#1989) * Corrected command (#1990) The CanPauseAndContinue property is a boolean so the correct comparison to use is $true rather than "True". * removing module ref for modules that do not ship in v6-rc2 (#1996) * Fix parameter's position in Resume-Service.md (#1998) * Fix link for about_Providers (#1999) * Help doc enhancement for ConvertFrom-StringData cmdlet (#2002) * Help doc correction Removed an unwanted * from Notes section Corrected intenting for last example Removed unwanted ... from example 2 * Help doc wnhancements in all versions for ConvertFrom-StringData Removed an unwanted * from Notes section Corrected intenting for last example Removed unwanted ... from example 2 * PowerShell 6 logging on Windows, Linux, and MacOS (#1922) * First draft of PowerShell 6 logging * Fix style guideline issues. * Document logging settings in PowerShellProperties.json * Address PR Feedback Limit lines to 80 columns, when possible Insert <br> in selected locations to improve readability of rendered markdown. * Reformatted tables Reformatted tables to work with new processing of About_* topics * Adding calling the ComputerName parameter to the example (#1964) * Adding calling the ComputerName parameter to the example * Changing quotes to brackets * Removed unused variable in Example 1 (#2004) The variable was declared but not used. It also appears in the same place in Example 2 but is used later on. * Made surrounding text agree with sample code. (#2003) * Reformatting v4 About_ topics missed in first pass (#2006) * v4 about scrub missed files * fixing broken links * fix broken link * Reformatting v3 About_ topics missed in first pass (#2005) * v3 about scrub missed files * fixing broken links * fix broken link * Reformatting v5 About_ topics missed in first pass (#2008) * v5 about scrub missed files * fixing broken links * v5.1 about scrub missed files (#2009) * Reformatting v6 About_ topics missed in first pass (#2010) * v6 about scrub missed files * fixing broken links and removing non-v6 content * final pass on About_ topic reformat (#2011) * Corrected Example 3 (#2014) * Corrected Example 3 Example 3 is an example to remove the user from the group but instead it was removing the group completely. This change adds the correct syntax to perform what was intended. See #2001 * minor edits for spacing and metadata * Enable running pandoc on about topic files (#2012) * Enable running pandoc on about topic files * Remove extra line * Removed --ascii parameter from pandoc as it is not required * Creates output directory as pandoc needs it (#2018) * remove alias `sc` to match PSCore6 (#2021) * Cmdlet help for ConvertFrom-Clixml and ConvertTo-Clixml (#2022) * Cmdlet help for ConvertFrom-Clixml and ConvertTo-Clixml for Powershell#3898 * minor edits - Removed -information* common parameters - reformat code blocks - renumbered example * minor updates - reformatted examples - removed common paramters * update link to about topic * minor edits - removed common parameters - formatted code blocks * minor edits - reformatted code blocks - removed common parameters * fix broken link (#2024) * Adding more info to Contributor Guide (#2023) * adding notes about OPS extensions * added notes about OPS extensions and linking * fix typo * fix typo * Support lifecycle doc (#1994) * first pass of support lifecycle doc * add notes on MIT license * address slee's comments on support lifecycle * respond to lifecycle feedback from Sean * add lifecycle image * Fixed spelling typo * add lifecycle to TOC * respond to feedback on lifecycle * Removed en-us from URLs You need to remove locale paths from URLs. Including en-us forces the reader to English rather than being redirected to the localized version of the article that matches their locale. * add note on 12 months, fix en-us * Fixed typo * Move setup/install and remoting docs into PowerShell-Docs (#2026) This creates a couple new topics around WSMan remoting, SSH remoting, and installing/configuring PowerShell Core. It also adds a topic on using VS Code with PowerShell. * PowerShell Core 6.0 release notes (#2020) What's New in PowerShell Core 6.0
1 parent 752430e commit 6aed37d

File tree

25 files changed

+2366
-104
lines changed

25 files changed

+2366
-104
lines changed

contributing/STYLE.md

Lines changed: 84 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,19 +111,94 @@ to get this output:
111111

112112
## Links
113113

114-
* Avoid using bare URLs. Links should use MarkDown syntax `[friendlyname](url)`
115-
* Links should have a a friendly name when applicable, most likely the title of the linked page
116-
* **Exception**: Links to non-Microsoft sites can be bare URLs
114+
* Avoid using bare URLs. Links should use MarkDown syntax `[friendlyname](url-or-path)`
115+
* **Exception**: Links to non-Microsoft sites can be bare URLs for transparency
116+
* Links must have a friendly name, usually the title of the linked topic
117117
* All items in the "related links" section at the bottom should be hyperlinked.
118+
* Use relative links when linking to other content that is hosted on **docs.microsoft.com**.
118119

119-
## Using relative links
120+
### Structure of links on docs.microsoft.com
121+
122+
Content presented on docs.microsoft.com has the following URL structure:
123+
124+
```
125+
https://docs.microsoft.com/<locale>/<product-service>/[<feature-service>]/[<subfolder>]/<topic>[?view=<view-name>]
126+
```
127+
128+
Examples:
129+
130+
```
131+
https://docs.microsoft.com/en-us/azure/load-balancer/load-balancer-overview
132+
https://docs.microsoft.com/en-us/powershell/azure/overview?view=azurermps-5.1.1
133+
```
134+
135+
- **\<locale>** - identifies the language of the article (example: en-us or de-de)
136+
- **\<product-service>** - the name of the product or service being documented (example: powerShell, dotnet, or azure)
137+
- **[\<feature-service>]** - (optional) the name of the product's feature or subservice (for example, csharp or load-balancer)
138+
- **[\<subfolder>]** - (optional) the name of a subfolder within a feature
139+
- \<topic> - the name of the article file for the topic (example: load-balancer-overview or overview)
140+
- **[?view=\<view-name>]** - (optional) the view name used by the version selector for content that has multiple versions available (example: azurermps-5.1.1)
141+
142+
### Linking to content in the same repo
120143

121-
You should use relative links when linking to other content that is hosted on **docs.microsoft.com**.
122144
When the content is in the same repo, the relative links are simple to calculate.
123-
Note that the path to cmdlet reference is created by our publishing system.
124-
There are special rules for linking to reference topics from conceptual topics.
145+
The link target must be the path to the _Markdown file_ in the repo.
146+
For example, the following markdown links to the about_Arrays topic in this repo.
147+
148+
```Markdown
149+
[about_Arrays](../reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md)
150+
```
151+
152+
Here is the live link:
153+
154+
[about_Arrays](../reference/5.1/Microsoft.PowerShell.Core/About/about_Arrays.md)
155+
156+
Note that the live link works within the GitHub view of this content.
157+
158+
### Linking to content in a different repo
159+
160+
When the content is in a different repo, the relative links are more complicated.
161+
The link target must be the URL path to the _published article_ on **docs.microsoft.com**.
162+
The relative link starts with the **\<product-service>** portion of the URL as described above.
163+
You should omit the **[?view=\<view-name>]** portion unless you need to link to a specific version of the content.
164+
165+
For example, the following markdown links to the Overview topic for Azure PowerShell.
166+
167+
```Markdown
168+
[Overview of Azure PowerShell](/powershell/azure/overview)
169+
```
170+
171+
Here is the live link:
172+
173+
[Overview of Azure PowerShell](/powershell/azure/overview)
174+
175+
Note that the live link does not resolve within the GitHub view of this content.
176+
This link only works on the webpage published to **docs.microsoft.com**.
177+
178+
## Markdown extensions supported by Open Publishing
179+
The following sections describe supported extensions in Open Publishing.
180+
181+
### Note, warning, tip, important
182+
Use specific syntax inside a block quote to indicate that the content is a type of note.
183+
184+
```Markdown
185+
> [!NOTE]
186+
> This is a note.
187+
188+
> [!WARNING]
189+
> This is a warning.
190+
191+
> [!TIP]
192+
> This is a tip.
193+
194+
> [!IMPORTANT]
195+
> This is important.
196+
197+
```
198+
199+
And it will be rendered like this:
125200

126-
\[TO DO\] - document special rules
201+
![alert boxes](./images/alert-boxes.png)
127202

128203
## Next steps
129204

@@ -137,4 +212,4 @@ See [Formatting code blocks](FORMATTING-CODE.md).
137212
[links]: https://help.github.com/articles/relative-links-in-readmes/
138213
[gfm-spec]: https://github.github.com/gfm/
139214
[semantics]: http://rhodesmill.org/brandon/2012/one-sentence-per-line/
140-
[platyPS]: https://github.com/PowerShell/platyPS
215+
[platyPS]: https://github.com/PowerShell/platyPS

contributing/WRITING.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Writing PowerShell documentation
22

33
One of the easiest ways to contribute to PowerShell is by helping to write and edit documentation.
4-
All of our documentation hosted on GitHub is written using GitHub Flavored Markdown (GFM).
4+
All of our documentation hosted on GitHub is written using *Markdown*.
5+
Markdown is a lightweight markup language with plain text formatting syntax.
6+
Markdown forms the basis of our documentation's conceptual authoring language.
7+
Creating new articles is as easy as writing a simple text file by using your favorite text editor.
58

69
## Markdown editors
710

@@ -12,16 +15,20 @@ Here are some Markdown editors you can try out:
1215
* [Atom](https://atom.io/)
1316
* [Sublime Text](http://www.sublimetext.com/)
1417

15-
## Using GitHub Flavored Markdown
18+
## Get started using Markdown
1619

17-
To get started using GFM, see GitHub's Help topics for [Writing on GitHub][gfm-help].
20+
To get started using Markdown, see GitHub's Help topics for [Writing on GitHub][gfm-help].
1821

1922
**NOTE:** GitHub recently adopted the CommonMark specification (with GFM extensions) for its Markdown syntax.
2023
In the new specification, many spacing rules have changed.
2124
Spaces are significant in GFM.
2225
Do not use hard tabs in Markdown.
2326
For more detailed information about the Markdown specification, see the [GitHub Flavored Markdown Spec][gfm-spec].
2427

28+
DocFX, used by OPS, supports DocFX Flavored Markdown (DFM).
29+
DFM is highly compatible with GitHub Flavored Markdown (GFM) and adds some functionality, including cross-reference and file inclusion.
30+
There are [differences between DFM and GFM][dfm-diffs] that can affect content preview in GitHub or your editor.
31+
2532
## Creating new topics
2633

2734
If you want to contribute new documentation, first check for [issues tagged as "in progress"][labels]
@@ -53,4 +60,5 @@ Read the [Style Guide](STYLE.md).
5360
[gfm-help]: https://help.github.com/categories/writing-on-github/
5461
[gfm-spec]: https://github.github.com/gfm/
5562
[labels]: https://github.com/PowerShell/PowerShell-Docs/labels/in%20progress
56-
[gfm-task]: https://github.github.com/gfm/#task-list-items-extension-
63+
[gfm-task]: https://github.github.com/gfm/#task-list-items-extension-
64+
[dfm-diffs]: http://dotnet.github.io/docfx/spec/docfx_flavored_markdown.html#differences-between-dfm-and-gfm

contributing/images/alert-boxes.png

10 KB
Loading

reference/3.0/Microsoft.PowerShell.Core/About/about_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function Get-SmallFiles {
223223
```
224224

225225
For more information about the PSDefaultValue attribute class, see
226-
[PSDefaultValue Attribute Members](http://msdn.microsoft.com/library/windows/desktop/system.management.automation.psdefaultvalueattribute_members(v=vs.85).asp) on MSDN.
226+
[PSDefaultValue Attribute Members](https://msdn.microsoft.com/library/system.management.automation.psdefaultvalueattribute_members(v=vs.85).aspx) on MSDN.
227227

228228

229229
### Positional Parameters

reference/4.0/Microsoft.PowerShell.Core/About/about_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function Get-SmallFiles {
223223
```
224224

225225
For more information about the PSDefaultValue attribute class, see
226-
[PSDefaultValue Attribute Members](http://msdn.microsoft.com/library/windows/desktop/system.management.automation.psdefaultvalueattribute_members(v=vs.85).asp) on MSDN.
226+
[PSDefaultValue Attribute Members](https://msdn.microsoft.com/library/system.management.automation.psdefaultvalueattribute_members(v=vs.85).aspx) on MSDN.
227227

228228

229229
### Positional Parameters

reference/5.0/Microsoft.PowerShell.Core/About/about_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function Get-SmallFiles {
223223
```
224224

225225
For more information about the PSDefaultValue attribute class, see
226-
[PSDefaultValue Attribute Members](http://msdn.microsoft.com/library/windows/desktop/system.management.automation.psdefaultvalueattribute_members(v=vs.85).asp) on MSDN.
226+
[PSDefaultValue Attribute Members](https://msdn.microsoft.com/library/system.management.automation.psdefaultvalueattribute_members(v=vs.85).aspx) on MSDN.
227227

228228

229229
### Positional Parameters

reference/5.1/Microsoft.PowerShell.Core/About/about_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function Get-SmallFiles {
223223
```
224224

225225
For more information about the PSDefaultValue attribute class, see
226-
[PSDefaultValue Attribute Members](http://msdn.microsoft.com/library/windows/desktop/system.management.automation.psdefaultvalueattribute_members(v=vs.85).asp) on MSDN.
226+
[PSDefaultValue Attribute Members](https://msdn.microsoft.com/library/system.management.automation.psdefaultvalueattribute_members(v=vs.85).aspx) on MSDN.
227227

228228

229229
### Positional Parameters

reference/6/Microsoft.PowerShell.Core/About/about_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function Get-SmallFiles {
223223
```
224224

225225
For more information about the PSDefaultValue attribute class, see
226-
[PSDefaultValue Attribute Members](http://msdn.microsoft.com/library/windows/desktop/system.management.automation.psdefaultvalueattribute_members(v=vs.85).asp) on MSDN.
226+
[PSDefaultValue Attribute Members](https://msdn.microsoft.com/library/system.management.automation.psdefaultvalueattribute_members(v=vs.85).aspx) on MSDN.
227227

228228

229229
### Positional Parameters

reference/6/Microsoft.PowerShell.Management/Set-Content.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,6 @@ Otherwise, this cmdlet does not generate any output.
402402

403403
## NOTES
404404

405-
You can also refer to Set-Content by its built-in alias, "sc". For more information, see [about_Aliases](../Microsoft.PowerShell.Core/About/about_Aliases.md).
406-
407405
Set-Content is designed for string processing.
408406
If you pipe non-string objects to Set-Content, it converts the object to a string before writing it.
409407
To write objects to files, use Out-File.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
---
2+
ms.date: 2017-06-09
3+
schema: 2.0.0
4+
locale: en-us
5+
keywords: powershell,cmdlet
6+
online version:
7+
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
8+
title: ConvertFrom-Clixml
9+
---
10+
11+
# ConvertFrom-Clixml
12+
13+
## SYNOPSIS
14+
Converts an CLIXML string into new corresponding object in Windows PowerShell.
15+
16+
## SYNTAX
17+
18+
```
19+
ConvertFrom-Clixml -InputObject <string> [-IncludeTotalCount] [-Skip <UInt64>] [-First <UInt64>] [<CommonParameters>]
20+
```
21+
22+
## DESCRIPTION
23+
The **ConvertFrom-CliXml** cmdlet converts a CLIXML string with data that represents Microsoft .NET Framework objects and creates the objects in Windows PowerShell.
24+
25+
A valuable use of **ConvertFrom-CliXml** is to deserialize credentials and secure strings that have been serialized as secure XML by running the ConvertTo-Clixml cmdlet.
26+
For an example of how to do this, see Example 2.
27+
28+
## EXAMPLES
29+
30+
### Example 1: Import a serialized file and recreate an object
31+
32+
```powershell
33+
$clixml = Get-Process | ConvertTo-Clixml
34+
$Processes = ConvertFrom-Clixml $clixml
35+
```
36+
37+
This command uses the ConvertTo-Clixml cmdlet to create a serialized copy of the process information returned by Get-Process.
38+
It then uses **ConvertFrom-Clixml** to retrieve the contents of the serialized string and re-create an object that is stored in the $Processes variable.
39+
40+
### Example 2: Convert an encrypted credential object
41+
42+
```powershell
43+
$CredXml = $Credential | ConvertTo-Clixml
44+
$Credential = ConvertFrom-CliXml $CredXml
45+
```
46+
47+
The **ConvertTo-CliXml** cmdlet encrypts credential objects by using the
48+
[Windows Data Protection API](http://msdn.microsoft.com/library/windows/apps/xaml/hh464970.aspx).
49+
This ensures that only your user account can decrypt the contents of the credential object.
50+
51+
In this example, given a credential that you've stored in the $Credential variable by running the Get-Credential cmdlet, you can run the **ConvertTo-CliXml** cmdlet to serialize the credential to a string.
52+
53+
To deserialize the credential later, run the second command.
54+
This time, you are running ConvertFrom-Clixml to import the secured credential object into your script.
55+
This eliminates the risk of exposing plain-text passwords in your script.
56+
57+
## PARAMETERS
58+
59+
### -InputObject
60+
Specifies the CLIXML string to be converted to objects.
61+
You can also pipe the CLIXML string to **ConvertFrom-Clixml**.
62+
63+
```yaml
64+
Type: string
65+
Parameter Sets: (All)
66+
Aliases:
67+
68+
Required: True
69+
Position: 0
70+
Default value: None
71+
Accept pipeline input: True (ByPropertyName, ByValue)
72+
Accept wildcard characters: False
73+
```
74+
75+
### -First
76+
Gets only the specified number of objects.
77+
Enter the number of objects to get.
78+
79+
```yaml
80+
Type: UInt64
81+
Parameter Sets: (All)
82+
Aliases:
83+
84+
Required: False
85+
Position: Named
86+
Default value: False
87+
Accept pipeline input: False
88+
Accept wildcard characters: False
89+
```
90+
91+
### -Skip
92+
Ignores the specified number of objects and then gets the remaining objects.
93+
Enter the number of objects to skip.
94+
95+
```yaml
96+
Type: UInt64
97+
Parameter Sets: (All)
98+
Aliases:
99+
100+
Required: False
101+
Position: Named
102+
Default value: False
103+
Accept pipeline input: False
104+
Accept wildcard characters: False
105+
```
106+
107+
### -IncludeTotalCount
108+
Reports the total number of objects in the data set (an integer) followed by the selected objects.
109+
If the cmdlet cannot determine the total count, it displays "Unknown total count." The integer has an Accuracy property that indicates the reliability of the total count value.
110+
The value of Accuracy ranges from 0.0 to 1.0 where 0.0 means that the cmdlet could not count the objects, 1.0 means that the count is exact, and a value between 0.0 and 1.0 indicates an increasingly reliable estimate.
111+
112+
```yaml
113+
Type: SwitchParameter
114+
Parameter Sets: (All)
115+
Aliases:
116+
117+
Required: False
118+
Position: Named
119+
Default value: False
120+
Accept pipeline input: False
121+
Accept wildcard characters: False
122+
```
123+
124+
### CommonParameters
125+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](../../Microsoft.PowerShell.Core/About/about_CommonParameters.md).
126+
127+
## INPUTS
128+
129+
### System.String
130+
You can pipe a string that contains a path to **ConvertFrom-Clixml**.
131+
132+
## OUTPUTS
133+
134+
### PSObject
135+
**ConvertFrom-Clixml** returns objects that have been deserialized from the stored XML files.
136+
137+
## NOTES
138+
* When specifying multiple values for a parameter, use commas to separate the values. For example, "\<parameter-name\> \<value1\>, \<value2\>".
139+
140+
*
141+
142+
## RELATED LINKS
143+
144+
[Use PowerShell to Pass Credentials to Legacy Systems](http://blogs.technet.com/b/heyscriptingguy/archive/2011/06/05/use-powershell-to-pass-credentials-to-legacy-systems.aspx)
145+
146+
[Securely Store Credentials on Disk](http://powershellcookbook.com/recipe/PukO/securely-store-credentials-on-disk)
147+
148+
[Export-Clixml](Export-Clixml.md)
149+
150+
[Import-Clixml](Import-Clixml.md)
151+
152+
[ConvertTo-Clixml](ConvertTo-Clixml.md)
153+
154+

0 commit comments

Comments
 (0)