Skip to content

Commit 94789eb

Browse files
v2.28.0
1 parent 02fd521 commit 94789eb

File tree

13 files changed

+733
-51
lines changed

13 files changed

+733
-51
lines changed

PSScriptTools.psd1

206 Bytes
Binary file not shown.

PSScriptToolsManual.pdf

12.3 KB
Binary file not shown.

PrepAdoc.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ $prog = @{
2020
Write-Progress @prog
2121

2222
$ModulePath = Convert-Path $Path
23+
$moduleName = Split-Path $modulePath -leaf
2324
Write-Verbose "[$(Get-Date)] Working from $modulePath"
2425

2526
Write-Verbose "[$(Get-Date)] Importing ruby-related functions"
@@ -52,7 +53,8 @@ Write-Verbose "[$(Get-Date)] Importing adoc data from json"
5253
$data = Get-Content $DataPath | ConvertFrom-Json
5354

5455
Write-Verbose "[$(Get-Date)] Get the module version"
55-
$ver = (Import-PowerShellDataFile $ModulePath\*.psd1).moduleversion
56+
$ver = (Test-ModuleManifest -Path .\$modulename.psd1).version.tostring()
57+
#(Import-PowerShellDataFile $ModulePath\*.psd1).moduleversion
5658
Write-Verbose "[$(Get-Date)] Found version $ver"
5759

5860
#define a here-string for the main document in Asciidoctor format
@@ -162,7 +164,7 @@ $main | Out-File -FilePath $out -Encoding utf8
162164

163165
Write-Progress -Activity $prog.Activity -Completed
164166
Write-Host
165-
$msg = "Edit and review the adoc files and then run makepdf.ps1"
167+
$msg = "Edit and review the adoc files and then run makepdf.ps1. Also edit pdf-theme.yml with the updated version number for page headers."
166168
Write-Host $msg -ForegroundColor Cyan
167169

168170
Write-Verbose "[$(Get-Date)] Finished."

README.md

Lines changed: 83 additions & 25 deletions
Large diffs are not rendered by default.

adoc-data.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"Title": "PSScriptTools Manual",
44
"CodeTheme": "github",
55
"CodeThemePath": "",
6-
"Theme": "c:\\scripts\\pdf-theme.yml",
6+
"Theme": "pdf-theme.yml",
77
"Files": [
88
{
99
"Name": "Intro.md",

changelog.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# ChangeLog for PSScriptTools
22

3+
## v2.28.0
4+
5+
+ Added `Compare-Script` thanks to @cohdjn.
6+
+ Added `Get-PSProfile` and a related formatting file, `psprofilepath.format.ps1xml`.
7+
+ Updated `README.md`.
8+
39
## v2.27.0
410

511
+ Added a new command called `Get-MyAlias` with an alias of `gma`.
@@ -16,7 +22,7 @@
1622

1723
+ Cleaned up bad links and code fence re-formatting in `README.md`.
1824
+ Created new base version of `PSScriptToolsHelp.md`.
19-
+ Generated new help manual with a table of contents and nicer formatting. (Issue #87)
25+
+ Generated a new help manual with a table of contents and nicer formatting. (Issue #87)
2026
+ Renamed help pdf to `PSScriptToolsManual.pdf`.
2127

2228
## v2.26.1
@@ -135,7 +141,7 @@
135141
+ Added a default ANSI color map file `psansimap.json`.
136142
+ Modified module to use a copy of `psansimap.json` in $HOME if detected. Otherwise, use the module's version.
137143
+ Create a global variable called `PSAnsiFileMap` from importing the `psansimap.json` file.
138-
+ Updated `Show-Tree` to use an ansi color map. (Issue #69)
144+
+ Updated `Show-Tree` to use an ANSI color map. (Issue #69)
139145
+ Added `FileSystem-ansi.format.ps1xml` which adds a custom view called `ansi`. This colorizes files based on `$PSAnsiMap`.
140146
+ Updated `Show-Tree` to resolve child paths using `-LiteralPath`.
141147
+ Updated `README.md`
@@ -153,7 +159,7 @@
153159
+ Set the default parameter value for `-Path` in `Show-Tree` to the current directory.
154160
+ Modified `Show-Tree` to allow the user to specify an array of properties. This is a __breaking change__ as the parameter has been changed from a `switch` to `string[]`. (Issue #72)
155161
+ Removed `PROPERTY` label in `Show-Tree` output when displaying properties.
156-
+ Corrected errors in module manifest.
162+
+ Corrected errors in the module manifest.
157163
+ Added auto completer for `Runspace` parameter in `Remove-Runspace`.
158164
+ Added alias `rfn` for `New-RandomFileName`.
159165
+ Added alias `cfn` for `New-CustomFileName`.
@@ -198,7 +204,7 @@
198204

199205
## v2.16.0
200206

201-
+ Fixed bug in `New-CustomFileName` when using a 24 hour value. (Issue #62)
207+
+ Fixed bug in `New-CustomFileName` when using a 24-hour value. (Issue #62)
202208
+ Updated `Test-ExpressionForm` to clear the text results. (Issue #61)
203209
+ Updated `Convertto-WPFGrid` to display a refresh message. (Issue #43)
204210
+ Updated `foldersizeinfo.format.ps1xml` to include a KB formatted view.
@@ -245,11 +251,11 @@
245251
+ Added 'Convert-EventLogRecord' function and its alias `clr`.
246252
+ Added `Rename-Hashtable` function and its alias `rht`.
247253
+ Updated `Convertto-Markdown` to include options to format as a table.
248-
+ Updated module manifest to export `ConvertTo-WPFGrid` to all hosts. Code in the command will determine compatibility.
254+
+ Updated module manifest to export `ConvertTo-WPFGrid` to all hosts. The code in the command will determine compatibility.
249255
+ Updated `Find-FileItem` to work better cross-platform.
250256
+ Updated `New-WPFMessagebox` to work on PowerShell 7 on Windows platforms.
251257
+ Help Updates.
252-
+ Modified module and manifest to export all functions regardless of edition. Any OS limitations will be handled on a per command basis.
258+
+ Modified module and manifest to export all functions regardless of edition. Any OS limitations will be handled on a per-command basis.
253259
+ Updated `README.md`.
254260

255261
## v2.12.0
@@ -269,15 +275,15 @@
269275

270276
+ Added `Test-WithCulture`.
271277
+ Fixed typo in `Copy-Command` help.
272-
+ Created yaml formatted help files.
278+
+ Created YAML formatted help files.
273279
+ Updated `README.md`.
274280
+ Updated help documentation with online links.
275281
+ Updated `PSScriptTools.md`.
276282

277283
## v2.9.0
278284

279285
+ Added `ConvertFrom-Text` and its alias `cft`. (Issue #53)
280-
+ Updated `ConvertTo-UTC` to include an option to format result as a sortable string. (Issue #52)
286+
+ Updated `ConvertTo-UTC` to include an option to format the result as a sortable string. (Issue #52)
281287
+ Added `Get-WhoIs` and `whoisresult.format.ps1xml`.
282288
+ help documentation clean up.
283289
+ Updated and reorganized `README.md`.
@@ -309,17 +315,17 @@
309315

310316
## v2.6.0
311317

312-
+ Modified `Convertto-WPFGrid` to set maximum size equal to total available working area. (Issue #36)
313-
+ Modified `Convertto-WPFGrid` to change cursor on refresh and display a refresh message in the title bar
318+
+ Modified `Convertto-WPFGrid` to set maximum size equal to the total available working area. (Issue #36)
319+
+ Modified `Convertto-WPFGrid` to change the cursor on refresh and display a refresh message in the title bar
314320
+ Added InitializationScript option for `ConvertTo-WPFGrid`. (Issue #42)
315321
+ Added `ConvertTo-LocalTime` with an alias of `clt`.
316322
+ Updated `README.md`.
317323
+ Help updates.
318324

319325
## v2.5.0
320326

321-
+ fixed bug which was hiding the horizontal scroll bar in `ConvertTo-WPFGrid`. (Issue #40)
322-
+ fixed bug which prevented status bar from updating when manually refreshing in `ConvertTo-WPFGrid`. (Issue #34)
327+
+ Fixed bug which was hiding the horizontal scroll bar in `ConvertTo-WPFGrid`. (Issue #40)
328+
+ Fixed bug which prevented the status bar from updating when manually refreshing in `ConvertTo-WPFGrid`. (Issue #34)
323329
+ Changed time display in `ConvertTo-WPFGrid` as a timespan instead of raw seconds. (Issue #41)
324330
+ Markdown help cleanup.
325331
+ Added `Set-ConsoleTitle`.
@@ -329,8 +335,8 @@
329335
## v2.4.0
330336

331337
+ Made datagrid in `ConvertTo-WPFGrid` read-only. (Issue #38)
332-
+ Modified datagrid in `ConvertTo-WPFGrid` to better handle resizing. (Issue #36)
333-
+ Modified statusbar in `ConvertTo-WPFGrid` to better handle resizing. (Issue #37)
338+
+ Modified the datagrid in `ConvertTo-WPFGrid` to better handle resizing. (Issue #36)
339+
+ Modified the statusbar in `ConvertTo-WPFGrid` to better handle resizing. (Issue #37)
334340
+ Modified form in `ConvertTo-WPFGrid` to better fit in the screen and not exceed the screen area. (Issue #39)
335341
+ Added parameter to allow usage of local variables in `ConvertTo-WPFGrid`. (Issue #35)
336342
+ Help updates.
@@ -339,8 +345,8 @@
339345
## v2.3.0
340346

341347
+ Fixed bug in `ConvertTo-WPFGrid` that wasn't updating last update time. (Issue #30)
342-
+ Modified `ConvertTo-WPFGrid` to allow user to load their profile scripts into the runspace. (Issue #29)
343-
+ Modified auto sizing code in `ConvertTo-WPFGrid`.
348+
+ Modified `ConvertTo-WPFGrid` to allow the user to load their profile scripts into the runspace. (Issue #29)
349+
+ Modified auto-sizing code in `ConvertTo-WPFGrid`.
344350
+ Modified `ConvertTo-WPFGrid` to automatically display scroll bars when necessary.
345351
+ Modified `New-PSFormatXML` to display a warning on invalid property names. (Issue #33)
346352
+ Added `Get-myTimeInfo`, `ConvertTo-UTCTime` and `ConvertFrom-UTCTime` (Issue #31)
@@ -363,7 +369,7 @@
363369

364370
## v2.1.0
365371

366-
+ Added parameter to allow user to specify a type name with `New-PSFormatXML`. (Issue #26)
372+
+ Added parameter to allow the user to specify a type name with `New-PSFormatXML`. (Issue #26)
367373
+ Added `Get-ParameterInfo` command with an alias of `gpi`.
368374
+ Updated help for `Optimize-Text`.
369375
+ Help updates.
@@ -387,7 +393,7 @@
387393

388394
## v1.8.0
389395

390-
+ fixed typo in `Write-Detail`. (Thanks @AndrewPla)
396+
+ Fixed typo in `Write-Detail`. (Thanks @AndrewPla)
391397
+ Added `Compare-Module` function. (Issue #19)
392398
+ Added `Get-WindowsVersion` function. (Issue #20)
393399
+ Added `Get-WindowsVersionString` function.
@@ -401,7 +407,7 @@
401407

402408
+ Added `New-WPFMessagebox` function. (Issue #11)
403409
+ Added alias `nmb` for `New-WPFMessageBox`.
404-
+ Added icon files for WPF Message box.
410+
+ Added icon files for the WPF Message box.
405411
+ Updated `README.md`.
406412

407413
## v1.6.0
@@ -473,7 +479,7 @@
473479
## v0.4.0
474480

475481
+ Added `Copy-Command`. (Issue #2)
476-
+ Updated `Copy-Command` to open new file in the ISE or VSCode.
482+
+ Updated `Copy-Command` to open a new file in the ISE or VSCode.
477483
+ Added Format functions. (Issue #3)
478484
+ Updated help.
479485
+ Added new sample files.

docs/Compare-Script.md

Lines changed: 2 additions & 2 deletions
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:
4+
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Compare-Script.md
55
schema: 2.0.0
66
---
77

@@ -19,7 +19,7 @@ Compare-Script [[-Name] <String>] [-Gallery <String>] [<CommonParameters>]
1919

2020
## DESCRIPTION
2121

22-
Use this command to compare script versions between what is installed against an online repository like the PSGallery. Results will be automatically sorted by script name.
22+
Use this command to compare script versions between what is installed against an online repository like the PSGallery. Results will be automatically sorted by the script name.
2323

2424
## EXAMPLES
2525

docs/Get-PSProfile.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
external help file: PSScriptTools-help.xml
3+
Module Name: PSScriptTools
4+
online version: https://github.com/jdhitsolutions/PSScriptTools/blob/master/docs/Get-PSProfile.md
5+
schema: 2.0.0
6+
---
7+
8+
# Get-PSProfile
9+
10+
## SYNOPSIS
11+
12+
Get PowerShell profile locations
13+
14+
## SYNTAX
15+
16+
```yaml
17+
Get-PSProfile [<CommonParameters>]
18+
```
19+
20+
## DESCRIPTION
21+
22+
This command is designed for Windows-based systems to show all possible PowerShell profile scripts. Including those for VS Code and the PowerShell ISE.
23+
24+
## EXAMPLES
25+
26+
### Example 1
27+
28+
```powershell
29+
30+
PS C:\> Get-PSProfile
31+
32+
Name: PowerShell
33+
34+
Scope Path Exists
35+
----- ---- ------
36+
AllUsersCurrentHost C:\Program Files\PowerShell\7\Microsoft.PowerShell_profile.ps1 False
37+
AllUsersAllHosts C:\Program Files\PowerShell\7\profile.ps1 False
38+
CurrentUserAllHosts C:\Users\Jeff\Documents\PowerShell\profile.ps1 True
39+
CurrentUserCurrentHost C:\Users\Jeff\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 True
40+
41+
42+
Name: Windows PowerShell
43+
44+
Scope Path Exists
45+
----- ---- ------
46+
AllUsersCurrentHost C:\WINDOWS\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1 True
47+
AllUsersAllHosts C:\WINDOWS\System32\WindowsPowerShell\v1.0\profile.ps1 True
48+
CurrentUserAllHosts C:\Users\Jeff\Documents\WindowsPowerShell\profile.ps1 True
49+
CurrentUserCurrentHost C:\Users\Jeff\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 True
50+
51+
52+
Name: VSCode PowerShell
53+
54+
Scope Path Exists
55+
----- ---- ------
56+
CurrentUserCurrentHost C:\Users\Jeff\Documents\PowerShell\Microsoft.VSCode_profile.ps1 True
57+
AllUsersCurrentHost C:\Program Files\PowerShell\7\Microsoft.VSCode_profile.ps1 False
58+
...
59+
```
60+
61+
The command has a default formatted table view.
62+
63+
### Example 2
64+
65+
```powershell
66+
PS C:\> Get-PSProfile | Where-Object Exists | Format-List
67+
68+
69+
Name: PowerShell
70+
71+
72+
Scope : CurrentUserAllHosts
73+
Path : C:\Users\Jeff\Documents\PowerShell\profile.ps1
74+
Exists : True
75+
LastModified : 9/9/2020 2:35:45 PM
76+
77+
Scope : CurrentUserCurrentHost
78+
Path : C:\Users\Jeff\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
79+
Exists : True
80+
LastModified : 9/9/2020 2:03:44 PM
81+
82+
83+
84+
Name: Windows PowerShell
85+
86+
87+
Scope : AllUsersCurrentHost
88+
Path : C:\WINDOWS\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell_profile.ps1
89+
Exists : True
90+
LastModified : 10/9/2017 4:08:35 PM
91+
...
92+
```
93+
94+
The command has a default list view.
95+
96+
## PARAMETERS
97+
98+
### CommonParameters
99+
100+
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
101+
102+
## INPUTS
103+
104+
### None
105+
106+
## OUTPUTS
107+
108+
### PSProfilePath
109+
110+
## NOTES
111+
112+
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/
113+
114+
## RELATED LINKS

0 commit comments

Comments
 (0)