Skip to content

Merging to live to fix missing images #2047

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 200 commits into from
Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
200 commits
Select commit Hold shift + click to select a range
2a3ccf3
Update the example of `Where-Object -IsNot` (#1841)
matt9ucci Nov 7, 2017
f778a37
Update Example 5 in Group-Object.md (#1845)
matt9ucci Nov 8, 2017
1357977
removing @{Text=} tags
Nov 7, 2017
efba651
fixing UTF8 characters
Nov 7, 2017
b93a6ba
removed empty H3
Nov 7, 2017
ec505bf
added H3 for input and output types
Nov 7, 2017
c2abb44
removed mangled UTF8 character
Nov 8, 2017
bbffd77
updating Out-* commands with -NoNewLine per Issue 1739
Nov 9, 2017
2bdb9e6
Fix the example of `Format-Table -DisplayError` (#1848)
matt9ucci Nov 9, 2017
61cb77d
Fix the example of `Format-Wide -DisplayError` (#1850)
matt9ucci Nov 10, 2017
882b0e8
Fix the example of `Format-Custom -DisplayError` (#1849)
matt9ucci Nov 10, 2017
67db02a
updating set-acl docs per PR#901
Nov 7, 2017
9799c2b
using semantic link breaks
Nov 10, 2017
a5f21c5
Fix the example of `Format-Wide -ShowError` (#1851)
matt9ucci Nov 13, 2017
9467262
Fixed Test-ScriptFileInfo example (#1852)
alan-null Nov 13, 2017
b5d12a3
fixing issue 1768
Nov 7, 2017
b04197f
Formatting, example fix for Body parameter (#1847)
ebrucucen Nov 13, 2017
b6b156a
fixing style consistency across articles
Nov 13, 2017
e03a354
fixing conflicts
Nov 13, 2017
07b21b0
Fix example numbers in Resume-Job.md (#1857)
matt9ucci Nov 14, 2017
348ed70
Fixes typo $WebSiteName in separatingEnvData.md (#1856)
DexterPOSH Nov 14, 2017
b04a75a
Updates configurations.md (#1855)
DexterPOSH Nov 14, 2017
484d598
Fix typo in comment (#1854)
ciriarte Nov 14, 2017
e46d3a1
Merge pull request #1846 from sdwheeler/sdw-issue1739
zjalexander Nov 14, 2017
f42a62f
Updating the help content for v6. (#1853)
adityapatwardhan Nov 15, 2017
eade8e4
Fix example numbers in about_Transactions.md (#1859)
matt9ucci Nov 15, 2017
518fde2
Update Alias-Provider.md (#1831)
doctordns Nov 15, 2017
248e283
Add documentation of new -AsHashtable switch for ConvertFrom-Json int…
bergmeister Nov 15, 2017
bcedaf0
Fix example numbers in Invoke-WebRequest.md (#1862)
matt9ucci Nov 16, 2017
8e4ac81
Merge branch 'live' into staging
Nov 16, 2017
1f54577
reformatting and integrating changes from PR#1831 (#1860)
Nov 16, 2017
aeeb091
Fix example numbers in Get-Help.md (#1869)
matt9ucci Nov 17, 2017
83b1241
Fix example numbers in Import-Module.md (#1868)
matt9ucci Nov 17, 2017
99be9ad
Fix example number in ConvertTo-Html.html (#1867)
matt9ucci Nov 17, 2017
919d940
Update dscCiCd.md (#1865)
tomlarse Nov 17, 2017
cb00730
Web Cmdlets 6.0.0 Documentation Refresh (#1870)
markekraus Nov 18, 2017
6e31c85
Merge Example 4 and 5 in Get-Member.md (#1874)
matt9ucci Nov 18, 2017
cc018bf
Remove hash algorithms unsupported in v6.0 (#1873)
matt9ucci Nov 19, 2017
b98aa67
Update outputs of Get-Verb (#1872)
matt9ucci Nov 19, 2017
1b2889e
Fix typo in ConvertTo-Html.md (UTF-x) (#1879)
matt9ucci Nov 20, 2017
4fec39b
Fix "Accept wildcard characters" in Get-Service.md v6 (#1878)
matt9ucci Nov 20, 2017
061245d
Fixed Get-WindowsFeature cmdlet HyperLink (#1877)
keeratsingh Nov 20, 2017
496832f
Update Get-WinEvent.md (#1876)
doctordns Nov 20, 2017
c644c38
Update Example 8 in Get-Process.md (find the owner of a process) (#1875)
matt9ucci Nov 20, 2017
58b15dd
updated localmachine\Root to LocalMachine\My (#1880)
rchaganti Nov 20, 2017
69c037d
Update Group property example in Get-Verb.md (#1881)
matt9ucci Nov 21, 2017
d69465e
adding missing space (#1885)
mairaw Nov 21, 2017
a066c77
removing stray character (#1886)
mairaw Nov 21, 2017
bf70ac9
Update Example 9 in Get-Process.md (#1888)
matt9ucci Nov 22, 2017
6687a84
Remove "About ISE" files of v6.0 (#1891)
matt9ucci Nov 27, 2017
23afc78
Update Get-Process.md (#1890)
doctordns Nov 27, 2017
5a8d5f4
Update productincompat.md (#1892)
Cloud-Writer Nov 27, 2017
46d7c99
Update unapproved verbs examples in Get-Verb.md (#1896)
matt9ucci Nov 28, 2017
a88c947
Removing extra space in the Example 5A script (#1894)
vrnithinkumar Nov 28, 2017
a2d0e9b
fixing merge conflict
Nov 28, 2017
f0f0da0
resolving conflict
Nov 28, 2017
d395d0e
updates to style and contrib
Nov 16, 2017
d4d446d
tweak format
Nov 16, 2017
67ad296
tweak format 2
Nov 16, 2017
7883844
fix typo
Nov 16, 2017
b4877f3
fix number list example
Nov 16, 2017
9e6ebd0
adding review feedback
Nov 22, 2017
323e325
fix broken links
Nov 22, 2017
e6b4a53
incorporating feedback from zach
Nov 27, 2017
7514fcf
reformatting About_* for 80 columns - part 1
Nov 27, 2017
66ecafd
reformat about_*
Nov 28, 2017
56dc2df
reformatting About_* topics - Part 2
Nov 28, 2017
d310e14
fixing broken links
Nov 28, 2017
e084dc5
fixing more broken links
Nov 28, 2017
05ff294
more broken links fixed
Nov 28, 2017
a935671
Fix parameter's position in Get-Random.md (#1901)
matt9ucci Nov 29, 2017
9040d65
Fix parameter's position in Measure-Command.md (#1905)
matt9ucci Nov 30, 2017
c715ab2
Fix parameter's position in Trace-Command.md (#1904)
matt9ucci Nov 30, 2017
6824d85
Actually call the configuration in the example (#1906)
charlesbihis Nov 30, 2017
cece485
reformatting About_* for 80 columns - part 3 (#1902)
Nov 30, 2017
877c2cc
reformatting About_* for 80 columns - part 4
Nov 30, 2017
1e0c256
Adding PreRelease versioning info for PSGallery & PSGet (#1903)
Dec 1, 2017
38d64d4
Style tweaks in STYLE.md (#1913)
SamB Dec 2, 2017
c6f3f13
Fix YAML metadata on "Understanding Concepts" (#1911)
SamB Dec 2, 2017
92e1b1b
Fix parameter's position in Join-Path.md (#1909)
matt9ucci Dec 2, 2017
b71d428
typo correction on line 85 (#1916)
J0F3 Dec 4, 2017
4e6505f
Fix parameter's position in Get-TraceSource.md (#1917)
matt9ucci Dec 4, 2017
a935850
Changed required PSGet version to 1.6.0 (#1920)
Dec 4, 2017
96504e3
Update Example 5 in Get-Process.md (#1923)
matt9ucci Dec 5, 2017
f586a98
fixing backlashes reported in PR1921 (#1924)
Dec 5, 2017
a08dbd5
Merge branch 'live' into staging
Dec 5, 2017
66349ff
reformatting About_* for 80 columns - part 5
Dec 1, 2017
6424e0d
reformatting About_* for 80 columns - part 6
Dec 1, 2017
03211c6
incorporating review feedback
Dec 4, 2017
a0b952c
reformatting About_* for 80 columns - part 7
Dec 2, 2017
bbe8f07
Fixed formatting of output per issue #808
Dec 4, 2017
eb2a12b
Merge branch 'live' into staging
Dec 5, 2017
6976ff4
Fix typo in syntax description (#1931)
TheSecretSquad Dec 6, 2017
6712f85
Fix parameter's position in ConvertTo-Xml.md (#1929)
matt9ucci Dec 6, 2017
6686c23
Remove descriptions about ComputerName parameter in Get-Process.md v6…
matt9ucci Dec 6, 2017
a0b2502
Line 192 Single Quote Breaks Example (#1930)
YuriySamorodov Dec 6, 2017
00a2675
Update Example 2 in Get-Alias.md (ineffective Exclude) (#1935)
matt9ucci Dec 7, 2017
010d9e5
Fix formatting: DESCRIPTION section in ConvertTo-Xml.md (#1934)
matt9ucci Dec 7, 2017
89de813
Fix typo in Unregister-ScheduledJob (#1932)
wemyss Dec 7, 2017
59ff97e
Fix parameter's position in ConvertFrom-Csv.md (#1937)
matt9ucci Dec 8, 2017
d428986
fix typo on metaConfig.md (#1936)
DaniSQL Dec 8, 2017
c070f79
Quick edits (#1938)
Dec 8, 2017
5119bda
Update Get-Item.md (#1942)
skycommand Dec 11, 2017
54a3de4
Add description about Format-Hex -InputObject (#1939)
matt9ucci Dec 11, 2017
4e663d6
Fix parameter's position in Add-Member.md (#1946)
matt9ucci Dec 12, 2017
2342a7e
Fix parameter's position in Select-Object.md (#1945)
matt9ucci Dec 12, 2017
7e23ff9
Correcting add to hash table example (#1944)
Koshersalt Dec 12, 2017
7009825
Merge branch 'live' into staging
Dec 12, 2017
4e99941
Fix Set-TraceSource -ListenerOption parameter (#1949)
matt9ucci Dec 13, 2017
85a3adb
Fix Trace-Command -ListenerOption parameter (#1948)
matt9ucci Dec 13, 2017
ba3ae32
Fix parameter's position in Select-Xml.md (#1953)
matt9ucci Dec 14, 2017
e9721d2
Fix Get-Alias -Name parameter (#1952)
matt9ucci Dec 14, 2017
41dc145
Wmf 5.1 cleanup (#1950)
Dec 14, 2017
c11cc97
Typo fix ("you will are not" -> "you will not"). (#1951)
relsqui Dec 14, 2017
8be92ec
added article about formatting code samples
Dec 14, 2017
52c3d1d
fixing typos
Dec 14, 2017
da136b5
fixed typos and incorporated feedback
Dec 14, 2017
7f1bfb6
updating metadata tags in docfx.json
Dec 14, 2017
4a0e687
Merge pull request #1954 from sdwheeler/sdw-codestyle
joeyaiello Dec 14, 2017
f190e9d
Merge pull request #1955 from sdwheeler/sdw-metafix
joeyaiello Dec 14, 2017
ff9fc52
Merge branch 'live' into staging
Dec 14, 2017
d0b75bb
fixing filename spelling
Dec 14, 2017
8c303f1
Fix parameter's position in Get-Content.md (#1959)
matt9ucci Dec 15, 2017
2dffaff
Fix parameter's position in Get-Member.md (#1958)
matt9ucci Dec 15, 2017
fa5064b
Update PSGallery "Items Tab" (for the new prerelease feature) (#1957)
matt9ucci Dec 15, 2017
8190bfc
Fix link for about_WorkflowCommonParameters in New-PSWorkflowExecutio…
matt9ucci Dec 18, 2017
9cfd38a
Fix link for about_Types.ps1xml in Update-TypeData.md (#1961)
matt9ucci Dec 18, 2017
219e848
Fix parameter's position in Group-Object.md (#1966)
matt9ucci Dec 19, 2017
91a778c
Fix hex values in about_Arithmetic_Operators.md (#1965)
matt9ucci Dec 19, 2017
7569a34
Indent headers as subheaders (#1967)
lavahot Dec 19, 2017
a6c39a2
Update minor typo in Limit-EventLog.md (#1968)
DannyMeister Dec 19, 2017
4dfa90f
Update Example 3 in Get-FileHash.md (#1969)
matt9ucci Dec 20, 2017
9603e0f
Fix parameter's position in Tee-Object.md (#1970)
matt9ucci Dec 20, 2017
45517f9
fixing output example per issue 1933
Dec 20, 2017
4c8ad5c
fix -Path metadata to reflect wildcard support
Dec 20, 2017
7f07ed2
fixing issue 1640
Dec 20, 2017
e3d2746
fixing issue 1651
Dec 20, 2017
83a1f36
Merge pull request #1974 from sdwheeler/sdw-issue1651
joeyaiello Dec 20, 2017
9fea401
Merge pull request #1973 from sdwheeler/sdw-issue1640
joeyaiello Dec 20, 2017
703bce7
Merge pull request #1972 from sdwheeler/sdw-issue1672
joeyaiello Dec 20, 2017
700455e
Merge pull request #1971 from sdwheeler/sdw-issue1933
joeyaiello Dec 20, 2017
2247085
Fix link for about_Remote_Requirements (#1976)
matt9ucci Dec 21, 2017
2f7bd31
Split parameter set in Sort-Object.md v6.0 (#1975)
matt9ucci Dec 21, 2017
bfb1184
Merge branch 'live' into staging
Dec 21, 2017
1854c4d
Fix link for about_Preference_Variables (#1982)
matt9ucci Dec 22, 2017
34e0059
Fix broken headers in Get-CimSession.md v6.0 (#1981)
matt9ucci Dec 22, 2017
bd76183
Update Example 1 in Import-Counter.md (#1980)
matt9ucci Dec 22, 2017
ce0b7c1
move $OFS to prefs article added note about read-only (#1978)
Dec 22, 2017
4ff282e
Merge branch 'live' into staging
Dec 22, 2017
62d8b8a
Update decisionMaker.md (#1984)
rockygiglio Dec 30, 2017
6a1218a
Update configurations.md (#1985)
bradh Dec 30, 2017
ccb1710
Fix parameter's position in Restart-Service.md (#1993)
matt9ucci Jan 2, 2018
8eca7bc
Fix link for logical operators in about_Operator_Precedence.md (#1992)
matt9ucci Jan 2, 2018
272aa18
Update scriptResource.md (#1986)
bradh Jan 2, 2018
c454e5d
Bad link (#1988)
fullenw1 Jan 2, 2018
cb095ea
Update Example 1 of Protect-CmsMessage (#1987)
BladeFireLight Jan 2, 2018
8d405c1
Small edits for mispellings (#1989)
hintbw Jan 2, 2018
e777b83
Corrected command (#1990)
Jan 2, 2018
d0b6eb8
removing module ref for modules that do not ship in v6-rc2 (#1996)
Jan 2, 2018
160ba5e
Fix parameter's position in Resume-Service.md (#1998)
matt9ucci Jan 3, 2018
0e1efd4
Fix link for about_Providers (#1999)
matt9ucci Jan 3, 2018
ea3e851
Merge branch 'live' into staging
Jan 3, 2018
b1a95ce
Help doc enhancement for ConvertFrom-StringData cmdlet (#2002)
kvprasoon Jan 3, 2018
fa96dbb
PowerShell 6 logging on Windows, Linux, and MacOS (#1922)
dantraMSFT Jan 3, 2018
1ed352f
Adding calling the ComputerName parameter to the example (#1964)
mbreakey3 Jan 3, 2018
43ba68f
Removed unused variable in Example 1 (#2004)
Jan 4, 2018
308c233
Made surrounding text agree with sample code. (#2003)
regexaurus Jan 4, 2018
a2607ed
Reformatting v4 About_ topics missed in first pass (#2006)
Jan 4, 2018
e740350
Reformatting v3 About_ topics missed in first pass (#2005)
Jan 4, 2018
98f2b8a
Reformatting v5 About_ topics missed in first pass (#2008)
Jan 4, 2018
95d4005
v5.1 about scrub missed files (#2009)
Jan 4, 2018
c4bc861
Reformatting v6 About_ topics missed in first pass (#2010)
Jan 4, 2018
6c34220
final pass on About_ topic reformat (#2011)
Jan 5, 2018
27973f4
Merge branch 'live' into staging
Jan 5, 2018
11244d2
Corrected Example 3 (#2014)
Jan 5, 2018
f2f819f
Enable running pandoc on about topic files (#2012)
adityapatwardhan Jan 5, 2018
e7835e3
Creates output directory as pandoc needs it (#2018)
adityapatwardhan Jan 6, 2018
9a59fc6
Merge branch 'live' into staging
Jan 6, 2018
607b9f4
remove alias `sc` to match PSCore6 (#2021)
SteveL-MSFT Jan 9, 2018
3fceb89
Cmdlet help for ConvertFrom-Clixml and ConvertTo-Clixml (#2022)
charlieschmidt Jan 9, 2018
d9aa756
fix broken link (#2024)
Jan 9, 2018
38d2060
Adding more info to Contributor Guide (#2023)
Jan 10, 2018
7298a9d
Support lifecycle doc (#1994)
joeyaiello Jan 10, 2018
d05c00e
Move setup/install and remoting docs into PowerShell-Docs (#2026)
joeyaiello Jan 10, 2018
76160fe
PowerShell Core 6.0 release notes (#2020)
joeyaiello Jan 10, 2018
c4734c8
Merge branch 'live' into staging
Jan 10, 2018
4e8ebb8
update TOC and change title of setup mac/linux article (#2030)
Jan 10, 2018
d2b1b89
Merge branch 'live' into staging
Jan 10, 2018
436a35a
attempt to fix images (#2033)
Jan 11, 2018
debdacf
Merge branch 'live' into staging
Jan 11, 2018
491970b
Update docfx to add image support (#2040)
Jan 11, 2018
7eb9814
Update Installing-PowerShell-Core-on-Windows.md (#2042)
doctordns Jan 11, 2018
18fedf7
Fix $PSVersionTable.OS in What's New 6.0 (#2039)
matt9ucci Jan 11, 2018
6026e8d
Update WSMan-Remoting-in-PowerShell-Core.md (#2038)
Jan 11, 2018
2947472
Update Get-FormatData.md (#2034)
MSAdministrator Jan 11, 2018
b507330
Update Get-FormatData Markdown (#2035)
MSAdministrator Jan 11, 2018
c2ffb26
Updated Get-Runspace Help (#2032)
MSAdministrator Jan 11, 2018
cebcd52
updated docfx to try to fix images (#2043)
Jan 11, 2018
81a2dda
Add resource per version in docfx.json (#2046)
qinezh Jan 12, 2018
69e1113
Merge branch 'live' into staging
Jan 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 88 additions & 16 deletions reference/5.1/Microsoft.PowerShell.Utility/Get-FormatData.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,41 +39,64 @@ PS C:\> Get-FormatData
This command gets all the formatting data in the session.

### Example 2: Get formatting data by type name
```
PS C:\> Get-FormatData -TypeName "Microsoft.Wsman*"
```powershell
PS C:\> Get-FormatData -TypeName 'System.Management.Automation.Cmd*'
```

This command gets the formatting data items whose names begin with Microsoft.Wsman.
This command gets the formatting data items whose names begin with System.Management.Automation.Cmd*.

### Example 3: Examine a formatting data object
```
PS C:\> $F = Get-FormatData -TypeName helpinfoshort
```powershell
PS C:\> $F = Get-FormatData -TypeName 'System.Management.Automation.Cmd*'
PS C:\> $F
```
```Output
TypeName FormatViewDefinition
-------- --------------------
HelpInfoShort {help , TableControl} PS C:\> $F.FormatViewDefinition[0].control
Headers Rows
------- ----
{System.Management.Automation.TableControlColumnHeader, System.Manageme... {System.Management.Automation.TableControlRow} PS C:\> $F.FormatViewDefinition[0].control.headers
Label Alignment Width
----- --------- -----
Name Left 33
Category Left 9
Undefined 0
HelpInfoShort {help , TableControl}
```
```powershell
PS C:\> $F.FormatViewDefinition[0].control
```
```Output
Headers : {System.Management.Automation.TableControlColumnHeader, System.Management.Automation.TableControlColumnHeader, System.Management.Automation.TableControlColumnHeader,
System.Management.Automation.TableControlColumnHeader}
Rows : {System.Management.Automation.TableControlRow}
AutoSize : False
HideTableHeaders : False
GroupBy :
OutOfBand : False
```
```powershell
PS C:\> $F.FormatViewDefinition[0].control.Headers
```
```Output
Label Alignment Width
----- --------- -----
CommandType Undefined 15
Name Undefined 50
Version Undefined 10
Source Undefined 0
```

This example shows how to get a formatting data object and examine its properties.

### Example 4: Get formatting data and export it
```
```powershell
PS C:\> $A = Get-FormatData
PS C:\> Import-Module bitstransfer
PS C:\> $B = Get-FormatData
PS C:\> Compare-Object $A $B
```
```Output
InputObject SideIndicator
----------- -------------
Microsoft.BackgroundIntelligentTransfer.Management.BitsJob => PS C:\> Get-FormatData *bits* | Export-FormatData -FilePath c:\test\bits.format.ps1xml
```
```powershell
PS C:\> Get-Content c:\test\bits.format.ps1xml
```
```Output
<?xml version="1.0" encoding="utf-8"?><Configuration><ViewDefinitions>
<View><Name>Microsoft.BackgroundIntelligentTransfer.Management.BitsJob</Name>
...
Expand All @@ -88,10 +111,59 @@ It uses a pipeline operator (|) to send the format type object to the Export-For

The final command shows an excerpt of the format.ps1xml file content.

### Example 5: Get formatting data based on the specified version of PowerShell
```powershell
PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 1.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 2.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 3.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 4.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 5.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 5.1

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 6.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}
```

This example shows how to use **Get-FormatData** to get format data for a specified TypeName and a
specified PowerShell version.

## PARAMETERS

### -PowerShellVersion

Specify the version of PowerShell this cmdlet gets for the formatting data.
Enter a two digit number seperated by a period.

```yaml
Type: Version
Expand Down
55 changes: 50 additions & 5 deletions reference/5.1/Microsoft.PowerShell.Utility/Get-Runspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ title: Get-Runspace
# Get-Runspace

## SYNOPSIS
Gets active runspaces within a Windows PowerShellhost process.
Gets active runspaces within a Windows PowerShell host process.

## SYNTAX

Expand All @@ -35,20 +35,62 @@ The **Get-Runspace** cmdlet gets active runspaces in a Windows PowerShell host p

## EXAMPLES

### 1:
### Example 1: Get runspaces
```powershell
PS C:\> Get-Runspace
```

```Output
Id Name ComputerName Type State Availability
-- ---- ------------ ---- ----- ------------
1 Runspace1 localhost Local Opened Busy
2 Runspace2 localhost Local Opened Available
3 Runspace3 localhost Local Opened Available
```

### 2:
### Example 2: Get runspace by Id
```powershell
PS C:\> Get-Runspace -Id 2
```

```Output
Id Name ComputerName Type State Availability
-- ---- ------------ ---- ----- ------------
2 Runspace2 localhost Local Opened Available
```

### Example 3: Get runspace by Name
```powershell
PS C:\> Get-Runspace -Name Runspace1
```

```Output
Id Name ComputerName Type State Availability
-- ---- ------------ ---- ----- ------------
1 Runspace1 localhost Local Opened Busy
```

### Example 4: Get runspace by InstanceId
```powershell
PS C:\> $activeRunspace = Get-Runspace -Name Runspace1

PS C:\> Get-Runspace -InstanceId $activeRunspace.InstanceId
```

```Output
Id Name ComputerName Type State Availability
-- ---- ------------ ---- ----- ------------
1 Runspace1 localhost Local Opened Busy
```

In this example, we identify an available runspace using the `Name` parameter and we store the return object to a new
variable named `$activeRunspace`. The second example, we call `Get-Runspace` with the `InstanceId` parameter and pass
in the `$activeRunspace` variable but we specify the `InstanceId` property on our reuturn object.

## PARAMETERS

### -Id

Specifies the Id of a runspace

```yaml
Type: Int32[]
Expand Down Expand Up @@ -78,7 +120,7 @@ Accept wildcard characters: False
```

### -Name

Specifies the Name of a runspace

```yaml
Type: String[]
Expand All @@ -99,6 +141,9 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable

## OUTPUTS

### System.Management.Automation.Runspaces.RunspaceBase
You can pipe the results of a **Get-Runspace** command to **Debug-Runspace**.

## NOTES

## RELATED LINKS
Expand Down
104 changes: 88 additions & 16 deletions reference/6/Microsoft.PowerShell.Utility/Get-FormatData.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,41 +40,64 @@ PS C:\> Get-FormatData
This command gets all the formatting data in the session.

### Example 2: Get formatting data by type name
```
PS C:\> Get-FormatData -TypeName "Microsoft.Wsman*"
```powershell
PS C:\> Get-FormatData -TypeName 'System.Management.Automation.Cmd*'
```

This command gets the formatting data items whose names begin with Microsoft.Wsman.
This command gets the formatting data items whose names begin with System.Management.Automation.Cmd*.

### Example 3: Examine a formatting data object
```
PS C:\> $F = Get-FormatData -TypeName helpinfoshort
```powershell
PS C:\> $F = Get-FormatData -TypeName 'System.Management.Automation.Cmd*'
PS C:\> $F
```
```Output
TypeName FormatViewDefinition
-------- --------------------
HelpInfoShort {help , TableControl} PS C:\> $F.FormatViewDefinition[0].control
Headers Rows
------- ----
{System.Management.Automation.TableControlColumnHeader, System.Manageme... {System.Management.Automation.TableControlRow} PS C:\> $F.FormatViewDefinition[0].control.headers
Label Alignment Width
----- --------- -----
Name Left 33
Category Left 9
Undefined 0
HelpInfoShort {help , TableControl}
```
```powershell
PS C:\> $F.FormatViewDefinition[0].control
```
```Output
Headers : {System.Management.Automation.TableControlColumnHeader, System.Management.Automation.TableControlColumnHeader, System.Management.Automation.TableControlColumnHeader,
System.Management.Automation.TableControlColumnHeader}
Rows : {System.Management.Automation.TableControlRow}
AutoSize : False
HideTableHeaders : False
GroupBy :
OutOfBand : False
```
```powershell
PS C:\> $F.FormatViewDefinition[0].control.Headers
```
```Output
Label Alignment Width
----- --------- -----
CommandType Undefined 15
Name Undefined 50
Version Undefined 10
Source Undefined 0
```

This example shows how to get a formatting data object and examine its properties.

### Example 4: Get formatting data and export it
```
```powershell
PS C:\> $A = Get-FormatData
PS C:\> Import-Module bitstransfer
PS C:\> $B = Get-FormatData
PS C:\> Compare-Object $A $B
```
```Output
InputObject SideIndicator
----------- -------------
Microsoft.BackgroundIntelligentTransfer.Management.BitsJob => PS C:\> Get-FormatData *bits* | Export-FormatData -FilePath c:\test\bits.format.ps1xml
```
```powershell
PS C:\> Get-Content c:\test\bits.format.ps1xml
```
```Output
<?xml version="1.0" encoding="utf-8"?><Configuration><ViewDefinitions>
<View><Name>Microsoft.BackgroundIntelligentTransfer.Management.BitsJob</Name>
...
Expand All @@ -89,6 +112,54 @@ It uses a pipeline operator (|) to send the format type object to the Export-For

The final command shows an excerpt of the format.ps1xml file content.

### Example 5: Get formatting data based on the specified version of PowerShell
```powershell
PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 1.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 2.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 3.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 4.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 5.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 5.1

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}

PS C:\> Get-FormatData -TypeName 'Microsoft.Powershell.Utility.FileHash' -PowerShellVersion 6.0

TypeNames FormatViewDefinition
--------- --------------------
{Microsoft.Powershell.Utility.FileHash} {Microsoft.Powershell.Utility.FileHash}
```

This example shows how to use **Get-FormatData** to get format data for a specified TypeName and a
specified PowerShell version.

## PARAMETERS

### -InformationAction
Expand Down Expand Up @@ -136,7 +207,8 @@ Accept wildcard characters: False
```

### -PowerShellVersion

Specify the version of PowerShell this cmdlet gets for the formatting data.
Enter a two digit number seperated by a period.

```yaml
Type: Version
Expand Down
Loading