Skip to content

Commit

Permalink
Add source examples (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasNieto authored Dec 2, 2024
1 parent 01e1e5f commit cb9c001
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,35 @@ Saves packages to a directory.
```powershell
Save-Package -Name System.Management.Automation -Path C:\Temp
```

### Get registered package sources

```powershell
Get-PackageSource
```

### Register package source

```powershell
$params = @{
Name = 'nuget.org'
Location = 'https://api.nuget.org/v3/index.json'
Provider = 'NuGet'
ProtocolVersion = 3
}
Register-PackageSource @params
```

### Set package source

```powershell
Set-PackageSource -Name nuget.org -Location url
```

### Unregister package source

```powershell
Unregister-PackageSource -Name nuget.org
```

0 comments on commit cb9c001

Please sign in to comment.