Skip to content

Commit 15d722d

Browse files
v2.12.0
1 parent 85efbf7 commit 15d722d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+687
-1060
lines changed

PSScriptTools.psd1

-86 Bytes
Binary file not shown.

README.md

+28-4
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ PS C:\> (get-process | measure ws -sum).sum | format-value -Unit mb | format-val
849849
Or pull it all together:
850850

851851
```powershell
852-
PS C:\> get-ciminstance win32_operatingsystem |
852+
PS C:\> Get-CimInstance win32_operatingsystem |
853853
select-object @{Name = "TotalMemGB";Expression={Format-Value $_.TotalVisibleMemorySize -Unit mb}},
854854
@{Name="FreeMemGB";Expression={Format-Value $_.FreePhysicalMemory -unit mb -Decimal 2}},
855855
@{Name="PctFree";Expression={Format-Percent -Value $_.FreePhysicalMemory -Total $_.totalVisibleMemorySize -Decimal 2}}
@@ -861,6 +861,28 @@ TotalMemGB FreeMemGB PctFree
861861

862862
## Scripting Tools
863863

864+
### [Test-WithCulture](docs/Test-WithCulture.md)
865+
866+
When writing PowerShell commands, sometimes the culture you are running under becomes critical. For example, European countries use a different datetime format than North Americans which might present a problem with your script or command. Unless you have a separate computer running under the foreign culture, it is difficult to test. This command will allow you to test a scriptblock or even a file under a different culture, such as DE-DE for German.
867+
868+
```powershell
869+
PS C\> Test-WithCulture fr-fr -Scriptblock {
870+
Get-winEvent -log system -max 500 |
871+
Select-Object -Property TimeCreated,ID,OpCodeDisplayname,Message |
872+
Sort-Object -property TimeCreated |
873+
Group-Object {$_.TimeCreated.ToShortDateString()} -NoElement }
874+
875+
Count Name
876+
----- ----
877+
165 10/07/2019
878+
249 11/07/2019
879+
17 12/07/2019
880+
16 13/07/2019
881+
20 14/07/2019
882+
26 15/07/2019
883+
7 16/07/2019
884+
```
885+
864886
### [Copy-Command](docs/Copy-Command.md)
865887

866888
This command will copy a PowerShell command, including parameters and help to a new user-specified command. You can use this to create a "wrapper" function or to easily create a proxy function. The default behavior is to create a copy of the command complete with the original comment-based help block.
@@ -897,12 +919,12 @@ $obj = [PSCustomObject]@{
897919
Name = "Jeff"
898920
Date = (Get-Date)
899921
Computername = $env:computername
900-
OS = (get-ciminstance win32_operatingsystem -Property Caption).caption
922+
OS = (Get-CimInstance win32_operatingsystem -Property Caption).caption
901923
}
902924
Update-TypeData -TypeName $tname -MemberType "ScriptProperty" -MemberName "Runtime" -value {(Get-Date) - [datetime]"1/1/2019"} -force
903925
```
904926

905-
That looks like this by default:
927+
The custom object looks like this by default:
906928

907929
```powershell
908930
PS C:\> $obj
@@ -948,6 +970,8 @@ OperatingSystem : Microsoft Windows 10 Pro
948970
Runtime : 40.21:12:01
949971
```
950972

973+
If you run this command within VS Code and specify `-Passthru`, the resulting file will be opened in your editor.
974+
951975
### [Write-Detail](docs/Write-Detail.md)
952976

953977
This command is designed to be used within your functions and scripts to make it easier to write a detailed message that you can use as verbose output. The assumption is that you are using an advanced function with a Begin, Process and End scriptblocks. You can create a detailed message to indicate what part of the code is being executed. The output can be configured to include a datetime stamp or just the time.
@@ -971,4 +995,4 @@ Begin {
971995

972996
Where possible these commands have been tested with PowerShell Core, but not every platform. If you encounter problems, have suggestions or other feedback, please post an issue.
973997

974-
*last updated 2019-06-20 20:22:43Z UTC*
998+
last Updated 2019-08-20 19:20:40Z UTC

changelog.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Change Log for PSScriptTools
22

3+
## v2.12.0
4+
5+
+ Help updates
6+
+ Replaced GitHub online help links with bitly short links
7+
+ Minor updates to `README.md`
8+
+ Updated `Out-More` to work better with output from `Get-Help`.
9+
310
## v2.11.0
411

512
+ Added a grouping feature to `New-PSFormatXML` (Issue #54)

docs/Add-Border.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Add-Border.md
4+
online version: http://bit.ly/31PzBsZ
55
schema: 2.0.0
66
---
77

docs/Compare-Module.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Compare-Module.md
4+
online version: http://bit.ly/31UsaRA
55
schema: 2.0.0
66
---
77

docs/Convert-CommandtoHashtable.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Convert-CommandtoHashtable.md
4+
online version: http://bit.ly/31SLyhD
55
schema: 2.0.0
66
---
77

docs/Convert-HashTableToCode.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Convert-HashTableToCode.md
4+
online version: http://bit.ly/31SLU7X
55
schema: 2.0.0
66
---
77

docs/Convert-HashtableString.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Convert-HashtableString.md
4+
online version: http://bit.ly/31VA9Of
55
schema: 2.0.0
66
---
77

docs/ConvertFrom-Text.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/ConvertFrom-Text.md
4+
online version: http://bit.ly/31VAujZ
55
schema: 2.0.0
66
---
77

docs/ConvertFrom-UTCTime.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/ConvertFrom-UTCTime.md
4+
online version: http://bit.ly/31RGo5q
55
schema: 2.0.0
66
---
77

docs/ConvertTo-HashTable.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/ConvertTo-HashTable.md
4+
online version: http://bit.ly/31SG9Y2
55
schema: 2.0.0
66
---
77

docs/ConvertTo-Markdown.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/ConvertTo-Markdown.md
4+
online version: http://bit.ly/31Nn21e
55
schema: 2.0.0
66
---
77

docs/ConvertTo-UTCTime.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/ConvertTo-UTCTime.md
4+
online version: http://bit.ly/31RGrOE
55
schema: 2.0.0
66
---
77

docs/ConvertTo-WPFGrid.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/ConvertTo-WPFGrid.md
4+
online version: http://bit.ly/31TxZyi
55
schema: 2.0.0
66
---
77

docs/Convertto-LocalTime.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/ConvertTo-LocalTime.md
4+
online version: http://bit.ly/31VABfp
55
schema: 2.0.0
66
---
77

docs/Copy-Command.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Copy-Command.md
4+
online version: http://bit.ly/31Ty8Sm
55
schema: 2.0.0
66
---
77

docs/Find-CimClass.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Find-CimClass.md
4+
online version: http://bit.ly/31SEzp2
55
schema: 2.0.0
66
---
77

docs/Format-Percent.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Format-Percent.md
4+
online version: http://bit.ly/31UsX50
55
schema: 2.0.0
66
---
77

docs/Format-String.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Format-String.md
4+
online version: http://bit.ly/31UsW0W
55
schema: 2.0.0
66
---
77

docs/Format-Value.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Format-Value.md
4+
online version: http://bit.ly/31PAuBP
55
schema: 2.0.0
66
---
77

docs/Get-FileItem.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-FileItem.md
4+
online version: http://bit.ly/31VAIHR
55
schema: 2.0.0
66
---
77

docs/Get-MyTimeInfo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-MyTimeInfo.md
4+
online version: http://bit.ly/31RGxG0
55
schema: 2.0.0
66
---
77

docs/Get-MyVariable.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-MyVariable.md
4+
online version: http://bit.ly/31PAvFT
55
schema: 2.0.0
66
---
77

docs/Get-PSLocation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-PSLocation.md
4+
online version: http://bit.ly/31SEOQY
55
schema: 2.0.0
66
---
77

docs/Get-PSWho.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-PSWho.md
4+
online version: http://bit.ly/31SF1ne
55
schema: 2.0.0
66
---
77

docs/Get-ParameterInfo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-ParameterInfo.md
4+
online version: http://bit.ly/31XfFER
55
schema: 2.0.0
66
---
77

docs/Get-PowerShellEngine.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-PowerShellEngine.md
4+
online version: http://bit.ly/31SKmLm
55
schema: 2.0.0
66
---
77

docs/Get-TZData.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-TZData.md
4+
online version: http://bit.ly/31SFfe4
55
schema: 2.0.0
66
---
77

docs/Get-TZList.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-TZList.md
4+
online version: http://bit.ly/31SFp5a
55
schema: 2.0.0
66
---
77

docs/Get-WhoIs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-WhoIs.md
4+
online version: http://bit.ly/31Ut7JE
55
schema: 2.0.0
66
---
77

docs/Get-WindowsVersion.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-WindowsVersion.md
4+
online version: http://bit.ly/31QKsTt
55
schema: 2.0.0
66
---
77

docs/Get-WindowsVersionString.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-WindowsVersionString.md
4+
online version: http://bit.ly/31QKACr
55
schema: 2.0.0
66
---
77

docs/Invoke-InputBox.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Invoke-InputBox.md
4+
online version: http://bit.ly/31UtHXQ
55
schema: 2.0.0
66
---
77

docs/Join-Hashtable.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Join-Hashtable.md
4+
online version: http://bit.ly/31QKJ8X
55
schema: 2.0.0
66
---
77

docs/New-CustomFileName.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/New-CustomFileName.md
4+
online version: http://bit.ly/31LsDoS
55
schema: 2.0.0
66
---
77

docs/New-PSDriveHere.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/New-PSDriveHere.md
4+
online version: http://bit.ly/31SGnOS
55
schema: 2.0.0
66
---
77

docs/New-PSFormatXML.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
external help file: PSScriptTools-help.xml
33
Module Name: PSScriptTools
4-
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/New-PSFormatXML.md
4+
online version: http://bit.ly/31SGo5o
55
schema: 2.0.0
66
---
77

@@ -306,4 +306,4 @@ Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell
306306
307307
## RELATED LINKS
308308
309-
[Update-FormatData]()
309+
[Update-FormatData]()

0 commit comments

Comments
 (0)