Skip to content

Commit b1963fe

Browse files
committed
Updating the demo script.
1 parent 9527193 commit b1963fe

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

demos/PowerShellGet.ps1

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ Find-Module
1616
Find-Module PSScriptAnalyzer
1717

1818
# Save a module to the local machine
19-
Save-Module PSScriptAnalyzer -Path /tmp
19+
Save-Module PSScriptAnalyzer -Repository PSGallery -Path /tmp
2020
Get-ChildItem -Path /tmp/PSScriptAnalyzer/1.6.0/ -Recurse
2121

2222
# Install a module to the common modules location
23-
Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.0.2 -Scope CurrentUser
23+
Install-Module -Name PSScriptAnalyzer -RequiredVersion 1.0.2 -Scope CurrentUser -Repository PSGallery
2424

2525
# Discover the installed modules
2626
Get-InstalledModule
@@ -52,13 +52,11 @@ Find-Script
5252
Find-Script -Name Start-Demo
5353

5454
# Save scripts to a specified location
55-
Save-Script Start-Demo -Path /tmp
56-
Get-ChildItem -Path /tmp/Start-Demot.ps1
57-
58-
& '/tmp/Start-Demo.ps1'
55+
Save-Script Start-Demo -Repository PSGallery -Path /tmp
56+
Get-ChildItem -Path /tmp/Start-Demo.ps1
5957

6058
# Install a script to the common scripts location
61-
Find-Script -Name Start-Demo | Install-Script -Scope CurrentUser
59+
Find-Script -Name Start-Demo -Repository PSGallery | Install-Script -Scope CurrentUser
6260
Get-InstalledScript
6361

6462
Install-Script Fabrikam-Script -RequiredVersion 1.0 -Scope CurrentUser

0 commit comments

Comments
 (0)