Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/smitpi/PSConfigFile
Creates a Config file with Variables, PSDrives, Credentials, Shortcuts(Functions), PSDefaultParameters and a Starting location. You can then execute this config when your profile is loaded, or you can run it manually at any time. And all of the variables, psdrives credentials ext. are then available in your session. This way you can quickly and easily switch between "environment setups"
https://github.com/smitpi/PSConfigFile
powershell powershell-module
Last synced: 8 days ago
JSON representation
Creates a Config file with Variables, PSDrives, Credentials, Shortcuts(Functions), PSDefaultParameters and a Starting location. You can then execute this config when your profile is loaded, or you can run it manually at any time. And all of the variables, psdrives credentials ext. are then available in your session. This way you can quickly and easily switch between "environment setups"
- Host: GitHub
- URL: https://github.com/smitpi/PSConfigFile
- Owner: smitpi
- License: mit
- Created: 2021-10-08T20:24:35.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T19:37:07.000Z (about 2 years ago)
- Last Synced: 2024-05-23T00:31:18.205Z (7 months ago)
- Topics: powershell, powershell-module
- Language: PowerShell
- Homepage:
- Size: 7.17 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - smitpi/PSConfigFile - Creates a Config file with Variables, PSDrives, Credentials, Shortcuts(Functions), PSDefaultParameters and a Starting location. You can then execute this config when your profile is loaded, or you can (PowerShell)
README
# PSConfigFile
## Description
Creates a Config file with Variables, PSDrives, Credentials, Shortcuts(Functions), PSDefaultParameters and a Starting location. You can then execute this config when your profile is loaded, or you can run it manually at any time. And all of the variables, psdrives credentials ext. are then available in your session. This way you can quickly and easily switch between "environment setups"
## Getting Started
- Install from PowerShell Gallery [PS Gallery](https://www.powershellgallery.com/packages/PSConfigFile)
```
Install-Module -Name PSConfigFile -Verbose
```
- or run this script to install from GitHub [GitHub Repo](https://github.com/smitpi/PSConfigFile)
```
$CurrentLocation = Get-Item .
$ModuleDestination = (Join-Path (Get-Item (Join-Path (Get-Item $profile).Directory 'Modules')).FullName -ChildPath PSConfigFile)
git clone --depth 1 https://github.com/smitpi/PSConfigFile $ModuleDestination 2>&1 | Write-Host -ForegroundColor Yellow
Set-Location $ModuleDestination
git filter-branch --prune-empty --subdirectory-filter Output HEAD 2>&1 | Write-Host -ForegroundColor Yellow
Set-Location $CurrentLocation
```
- Then import the module into your session
```
Import-Module PSConfigFile -Verbose -Force
```
- or run these commands for more help and details.
```
Get-Command -Module PSConfigFile
Get-Help about_PSConfigFile
```
Documentation can be found at: [Github_Pages](https://smitpi.github.io/PSConfigFile)
## Functions
- [`Add-CommandToPSConfigFile`](https://smitpi.github.io/PSConfigFile/Add-CommandToPSConfigFile) -- Adds a command or script block to the config file, to be executed every time the invoke function is called.
- [`Add-CredentialToPSConfigFile`](https://smitpi.github.io/PSConfigFile/Add-CredentialToPSConfigFile) -- Creates a self signed cert, then uses it to securely save a credential to the config file.
- [`Add-FunctionToPSConfigFile`](https://smitpi.github.io/PSConfigFile/Add-FunctionToPSConfigFile) -- Creates Shortcuts (Functions) to commands or script blocks
- [`Add-LocationToPSConfigFile`](https://smitpi.github.io/PSConfigFile/Add-LocationToPSConfigFile) -- Adds default location to the config file.
- [`Add-PSDefaultParameterToPSConfigFile`](https://smitpi.github.io/PSConfigFile/Add-PSDefaultParameterToPSConfigFile) -- Add PSDefaultParameterValues to the config file
- [`Add-PSDriveToPSConfigFile`](https://smitpi.github.io/PSConfigFile/Add-PSDriveToPSConfigFile) -- Add PSDrive to the config file.
- [`Add-VariableToPSConfigFile`](https://smitpi.github.io/PSConfigFile/Add-VariableToPSConfigFile) -- Adds variable to the config file.
- [`Export-PSConfigFilePFX`](https://smitpi.github.io/PSConfigFile/Export-PSConfigFilePFX) -- Export the PFX file for credentials.
- [`Import-PSConfigFilePFX`](https://smitpi.github.io/PSConfigFile/Import-PSConfigFilePFX) -- Import the PFX file for credentials
- [`Invoke-PSConfigFile`](https://smitpi.github.io/PSConfigFile/Invoke-PSConfigFile) -- Executes the config from the json file.
- [`New-PSConfigFile`](https://smitpi.github.io/PSConfigFile/New-PSConfigFile) -- Creates a new config file
- [`Remove-ConfigFromPSConfigFile`](https://smitpi.github.io/PSConfigFile/Remove-ConfigFromPSConfigFile) -- Removes a item from the config file.
- [`Set-PSConfigFileExecution`](https://smitpi.github.io/PSConfigFile/Set-PSConfigFileExecution) -- Adds functionality to add the execution to your profile.
- [`Show-PSConfigFile`](https://smitpi.github.io/PSConfigFile/Show-PSConfigFile) -- Display what's configured in the config file.
- [`Update-CredentialsInPSConfigFile`](https://smitpi.github.io/PSConfigFile/Update-CredentialsInPSConfigFile) -- Allows you to renew the certificate or saved passwords.