-
Notifications
You must be signed in to change notification settings - Fork 34
Installation & Usage example in PowerShell 7
(This instruction is written by theuserbl)
Download the sources from github.
Input in Powershell the command
$Env:PSModulePath
and look in the directories, which are there listed.
In the directory you search for, are already directories like CimCmdlets
, Microsoft.PowerShell.Archive
and other.
Go to this directory called Modules
and input in the PowerShell
mkdir Get-ChildItemColor
Go then in the created directory Get-ChildItemColor and copy inside it the files in the src
directory of github called
FileInfo.ps1
, Get-ChildItemColor.psd1
, Get-ChildItemColor.psm1
, Get-ChildItemColorTable.ps1
, MatchInfo.ps1
,
ProcessInfo.ps1
, PSColorHelper.ps1
, ServiceController.ps1
Now input in the Powershell the command
$PROFILE
It outputs now the file, where the Powershell looks for initialization.
If the directory to that file not exists, creating it.
And if the file not exists, creating it, too.
Now open the file in an text-editor like notepad.exe for example with
notepad $PROFILE
Input there the lines
Import-Module Get-ChildItemColor
Set-Alias -Name dir -Value Get-ChildItemColor -Option AllScope
Set-Alias -Name ls -Value Get-ChildItemColorFormatWide
and save it.
Now start the PowerShell again.
With the command dir
you have a colord file list. With ls
it is then in wide mode. And gci
is still as default the old colorless output.
You can also use the outwritten normal commands Get-ChildItemColor
, Get-ChildItemColorFormatWide
and Get-ChildItem
.