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
Adds a default start-up location (folder or PSDrive) to the PSConfigFile configuration.
435
435
436
436
.DESCRIPTION
437
-
Use this function to specify a default working location for your PowerShell session, either as a folder path or a PSDrive. When the config file is invoked using Invoke-PSConfigFile, your session will automatically change to this location. This is useful for streamlining your workflow and ensuring you always start in the correct directory or drive.
437
+
Specifies a default working location for your PowerShell session, either as a folder path or a PSDrive. When the config file is invoked using Invoke-PSConfigFile, your session will automatically change to this location. This streamlines your workflow and ensures you always start in the correct directory or drive.
438
438
439
-
.PARAMETERLocationType
440
-
Specifies the type of location to add. Accepts 'PSDrive' for a PowerShell drive or 'Folder' for a filesystem path.
439
+
.PARAMETERPSDriveName
440
+
The name of the PowerShell drive to set as the default location. Must be a valid PSDrive. Use this parameter if you want to set a PSDrive as the start-up location.
441
441
442
-
.PARAMETERPath
443
-
The path to the folder or the name of the PSDrive to set as the default location. Must exist as a valid path or drive.
442
+
.PARAMETERFolderPath
443
+
The path to the folder to set as the default location. Must be a valid directory. Use this parameter if you want to set a filesystem folder as the start-up location.
444
444
445
445
.PARAMETERForce
446
446
If specified, the config file will be deleted before saving the new one. If not specified and a config file exists, it will be renamed as a backup before saving the new version.
Sets the default location to the 'c:\temp' folder when the config is invoked.
453
+
Add-LocationToPSConfigFile -FolderPath C:\temp
454
+
Sets the default location to the 'C:\temp' folder when the config is invoked.
455
455
456
456
.NOTES
457
457
Author: Pierre Smit
458
458
Website: https://smitpi.github.io/PSConfigFile
459
459
This function is part of the PSConfigFile module for managing PowerShell configuration automation. Use this to ensure your PowerShell session always starts in the correct directory or drive.
0 commit comments