You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Archive-ChangeLog.md
+17Lines changed: 17 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,23 @@
2
2
3
3
This file contains older change history. It is maintained for reference purposes.
4
4
5
+
## v2.34.0
6
+
7
+
+ Fixed typo bug in `Get-PSScriptTools` that was failing to get command aliases. ([Issue #99](https://github.com/jdhitsolutions/PSScriptTools/issues/99))
8
+
+ Modified `Get-PSScriptTools` to improve performance. Assuming that all exported functions are using standard verbs.
9
+
+ Added `Get-PSAnsiFileMap`.
10
+
+ Added `Set-PSAnsiFileMapEntry`.
11
+
+ Added `Remove-PSAnsiFileMapEntry`.
12
+
+ Added `Export-PSAnsiFileMap`.
13
+
+ Added `Show-ANSISequence`.
14
+
+ Updated `filesystem.ansi.format.ps1xml` to use last matching pattern.
15
+
+ Modified `Show-Tree` to better handle piped-in file and directory objects.
16
+
+ Added an alias `ab` for `Add-Border`.
17
+
+ Added an alias of `nab` for `New-AnsiBar`.
18
+
+ Updated `README.md`.
19
+
+ Updated module description.
20
+
+ Help updates.
21
+
5
22
## v2.33.1
6
23
7
24
+ Fixed bug in `ConvertTo-WPFGrid` with refresh and timeout values. (Issue #98)
@@ -15,7 +15,7 @@ The contents of this file and other documentation can be viewed using the `Open-
15
15
+[Installation](#Installation)
16
16
+[General Tools](#General-Tools)
17
17
+[File Tools](#File-Tools)
18
-
+[ToDo](#ToDo)
18
+
+[Editor Integrations](#Editor-Integrations)
19
19
+[Graphical Tools](#Graphical-Tools)
20
20
+[Hashtable Tools](#Hashtable-Tools)
21
21
+[Select Functions](#Select-Functions)
@@ -431,7 +431,7 @@ PS C:\> Get-MyVariable
431
431
NName Value Type
432
432
---- ----- ----
433
433
a bits ServiceController
434
-
dt 10/22/2018 10:49:38 AM DateTime
434
+
dt 10/22/2020 10:49:38 AM DateTime
435
435
foo 123 Int32
436
436
r {1, 2, 3, 4...} Object[]
437
437
...
@@ -781,12 +781,16 @@ which generates this markdown:
781
781
782
782
Because the function writes markdown to the pipeline you will need to pipe it to a command `Out-File` to create a file.
783
783
784
-
## ToDo
784
+
## Editor Integrations
785
785
786
-
Because this module is intended to make scripting easier for you, it adds options to insert ToDo statements into PowerShell files. If you are using the PowerShell ISE or VS Code and import this module, it will add the capability to insert a line like this:
786
+
Because this module is intended to make scripting easier for you, it adds a few editor specific features if you import this module in either the PowerShell ISE or Visual Studio Code. The VS Code features assume you are using the integrated PowerShell terminal.
787
+
788
+
### Insert ToDo
789
+
790
+
One such feature is the ability to insert ToDo statements into PowerShell files. If you are using the PowerShell ISE or VS Code and import this module, it will add the capability to insert a line like this:
787
791
788
792
```dos
789
-
# [12/13/2018 16:52:40] TODO: Add parameters
793
+
# [12/13/2020 16:52:40] TODO: Add parameters
790
794
```
791
795
792
796
In the PowerShell ISE, you will get a new menu under Add-Ons.
@@ -801,6 +805,17 @@ The comment will be inserted at the current cursor location.
801
805
802
806
In VS Code, access the command palette (Ctrl+Shift+P) and then `PowerShell: Show Additional Commands from PowerShell Modules`. Select `Insert ToDo` from the list, and you'll get the same input box. Note that this will only work for PowerShell files.
803
807
808
+
### Set Terminal Location
809
+
810
+
Another feature is the ability to set your terminal location to match that of the the currently active file. For example, if the current file is located in C:\Scripts\Foo and your terminal location is D:\Temp\ABC, you can quickly jump to the file location.
811
+
812
+
```dos
813
+
PS D:\Temp\ABC\> sd
814
+
PS C:\Scripts\Foo\>
815
+
```
816
+
817
+
The full command name is `Set-LocationToFile` but you'll find it easier to use the `sd` or `jmp` aliases. This command will also clear the host.
For the most part, objects you work with in PowerShell are guaranteed to be unique. But you might import data where there is the possibility of duplicate items. Consider this CSV sample.
1647
+
1648
+
```powershell
1649
+
$Obj = "Animal,Snack,Color
1650
+
Horse,Quiche,Chartreuse
1651
+
Cat,Doritos,Red
1652
+
Cat,Pringles,Yellow
1653
+
Dog,Doritos,Yellow
1654
+
Dog,Doritos,Yellow
1655
+
Rabbit,Pretzels,Green
1656
+
Rabbit,Popcorn,Green
1657
+
Marmoset,Cheeseburgers,Black
1658
+
Dog,Doritos,White
1659
+
Dog,Doritos,White
1660
+
Dog,Doritos,White
1661
+
" | ConvertFrom-Csv
1662
+
```
1663
+
1664
+
There are duplicate objects you might want to filter out. For that task, you can use `Get-PSUnique`.
1665
+
1666
+
```DOS
1667
+
PS C:\> $obj | Get-PSUnique | Sort-Object animal
1668
+
1669
+
1670
+
Animal Snack Color
1671
+
------ ----- -----
1672
+
Cat Pringles Yellow
1673
+
Cat Doritos Red
1674
+
Dog Doritos White
1675
+
Dog Doritos Yellow
1676
+
Horse Quiche Chartreuse
1677
+
Marmoset Cheeseburgers Black
1678
+
Rabbit Popcorn Green
1679
+
Rabbit Pretzels Green
1680
+
```
1681
+
1682
+
The duplicate items have been removed. This command works best with simple objects. If your objects have nested object properties, you will need to test if this command can properly filter for unique items.
1683
+
1629
1684
### [Test-IsElevated](docs/Test-IsElevated.md)
1630
1685
1631
1686
This simple command will test if the current PowerShell session is running elevated, or as Administrator. On Windows platforms the function uses the .NET Framework to test. On non-Windows platforms, the command tests the user's UID value.
@@ -2011,7 +2066,7 @@ This command is designed to be used within your functions and scripts to make it
2011
2066
2012
2067
```dos
2013
2068
PS C:\> write-detail "Getting file information" -Prefix Process -Date
2014
-
9/15/2018 11:42:43 [PROCESS] Getting file information
2069
+
9/15/2020 11:42:43 [PROCESS] Getting file information
2015
2070
```
2016
2071
2017
2072
In a script you might use it like this:
@@ -2230,6 +2285,61 @@ In this format view, ReadOnly aliases are displayed in Red.
2230
2285
2231
2286
Use [Get-FormatView](docs/Get-FormatView.md) to discover available format views. Or if you'd like to create your own custom views look at [New-PSFormatXML](docs/New-PSFormatXML.md)
2232
2287
2288
+
### Custom Type Extensions
2289
+
2290
+
When you import the module, you will also get custom type extensions. These are designed to make it easier to work with common objects in PowerShell.
2291
+
2292
+
#### System.IO.FileInfo
2293
+
2294
+
The module will extend file objects with the following alias properties:
2295
+
2296
+
| New Alias | Property |
2297
+
| --- | --- |
2298
+
| Size | Length |
2299
+
| Created | CreationTime |
2300
+
| Modified | LastWriteTime |
2301
+
2302
+
You also have new script properties
2303
+
2304
+
| Script Property | Description |
2305
+
| --- | --- |
2306
+
| ModifiedAge | A timespan between the current date the and last write time |
2307
+
| CreatedAge | A timespan between the current date the and creation time |
2308
+
| SizeKB | The file size formatted in KB to 2 decimal places |
2309
+
| SizeMB | The file size formatted in MB to 2 decimal places |
The Idle process will have a null value for this property.
2342
+
2233
2343
### PSSpecialChar
2234
2344
2235
2345
A number of the commands in this module can use special characters. To make it easier, when you import the module, it will create a global variable that is a hash table of common special characters. Because it is a hashtable, you can add to it.
@@ -2254,7 +2364,7 @@ This PowerShell module contains several functions you might use to enhance your
2254
2364
dir $pssamplepath
2255
2365
```
2256
2366
2257
-
The samples provide suggestions on how you might use some of the commands in this module. The scripts are offered AS-IS and are for demonstration purposes only.
2367
+
The samples provide suggestions on how you might use some of the commands in this module. The scripts are offered __AS-IS__ and are for demonstration purposes only.
Copy file name to clipboardExpand all lines: changelog.md
+14-18Lines changed: 14 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,19 @@
2
2
3
3
This file contains the most recent change history for the PSScriptTools module.
4
4
5
+
## v2.38.0
6
+
7
+
+ Added `Get-PSUnique` function with an alias of `gpsu`. ([Issue #109](https://github.com/jdhitsolutions/PSScriptTools/issues/109)).
8
+
+ Modified `Show-AnsiSequence` to default to `Foreground` when using `-Type` ([Issue #110](https://github.com/jdhitsolutions/PSScriptTools/issues/110)).
9
+
+ Cleaned up module manifest.
10
+
+ Updated `New-PSFormatXML` to __not__ create the ps1xml file if a bad property is detected ([Issue #111](https://github.com/jdhitsolutions/PSScriptTools/issues/111)).
11
+
+ Modified `New-PSFormatXML` to __not__ add an explicit declaration. This means the files will now be saved in the correct UTF-8 format and not UTF-8 with BOM.
12
+
+ Modified TODO VSCode command to put date at the end. Otherwise, it breaks the `Better Comments` extension.
13
+
+ Added `Set-LocationToFile` which is only loaded when importing the module in VS Code or the PowerShell ISE.
14
+
+ Re-saved all `.ps1xml` files as `UTF-8`.
15
+
+ Added custom type extension files `fileinfo.types.ps1xml` and `system.diagnostics.process.types.ps1xml`.
@@ -47,23 +60,6 @@ This file contains the most recent change history for the PSScriptTools module.
47
60
+ Fixed bug in `Get-ParameterInfo` that failed to display dynamic parameters when using a command alias. ([Issue #101](https://github.com/jdhitsolutions/PSScriptTools/issues/101))
48
61
+ Modified format file for `PSParameterInfo` to display `Mandatory` and `IsDynamic` values in color when the value is `$True`.
49
62
50
-
## v2.34.0
51
-
52
-
+ Fixed typo bug in `Get-PSScriptTools` that was failing to get command aliases. ([Issue #99](https://github.com/jdhitsolutions/PSScriptTools/issues/99))
53
-
+ Modified `Get-PSScriptTools` to improve performance. Assuming that all exported functions are using standard verbs.
54
-
+ Added `Get-PSAnsiFileMap`.
55
-
+ Added `Set-PSAnsiFileMapEntry`.
56
-
+ Added `Remove-PSAnsiFileMapEntry`.
57
-
+ Added `Export-PSAnsiFileMap`.
58
-
+ Added `Show-ANSISequence`.
59
-
+ Updated `filesystem.ansi.format.ps1xml` to use last matching pattern.
60
-
+ Modified `Show-Tree` to better handle piped-in file and directory objects.
61
-
+ Added an alias `ab` for `Add-Border`.
62
-
+ Added an alias of `nab` for `New-AnsiBar`.
63
-
+ Updated `README.md`.
64
-
+ Updated module description.
65
-
+ Help updates.
66
-
67
63
## Archive
68
64
69
-
If you need to see older change history, look at the [Archive ChangeLog](https://github.com/jdhitsolutions/PSScriptTools/blob/master/Archive-ChangeLog.md)
65
+
If you need to see older change history, look at the [Archive ChangeLog](https://github.com/jdhitsolutions/PSScriptTools/blob/master/Archive-ChangeLog.md) online.
0 commit comments