Console - cilerler/cilerler.github.io GitHub Wiki
Tip
You may find the scripts here
-
Remove all pinned items from taskbar except
File Explorer
(manually); -
Run
Initialize-DesktopEnvironment
-
Hide-SearchBoxFromTaskbar
-
Remove-AllPublicDesktopShortcuts
-
Set-DesktopWallpaper
-
Add-Folders
create-folders.ps1
## Source directories $sourcePath = Join-Path $env:USERPROFILE 'Source'; # Create base directories New-Item -ItemType "Directory" -Path $sourcePath -Force; # Local structure $localPath = Join-Path $sourcePath 'local' New-Item -ItemType "Directory" -Path $localPath -Force; New-Item -ItemType "Directory" -Path (Join-Path $localPath '!nuget') -Force; New-Item -ItemType "Directory" -Path (Join-Path $localPath '_git-bare') -Force; New-Item -ItemType "Directory" -Path (Join-Path $localPath 'archives') -Force; New-Item -ItemType "Directory" -Path (Join-Path $localPath 'docs') -Force; New-Item -ItemType "Directory" -Path (Join-Path $localPath 'knowledgebase') -Force; New-Item -ItemType "Directory" -Path (Join-Path $localPath 'sandbox') -Force; # Personal notes structure $basePath = Join-Path $localPath 'docs\personal' New-Item -ItemType "Directory" -Path $basePath -Force; New-Item -ItemType "File" -Path (Join-Path $basePath '.editorconfig') -Force; New-Item -ItemType "File" -Path (Join-Path $basePath '.gitignore') -Force; New-Item -ItemType "File" -Path (Join-Path $basePath '.gitattribute') -Force; New-Item -ItemType "Directory" -Path (Join-Path $basePath '.vscode') -Force; New-Item -ItemType "Directory" -Path (Join-Path $basePath '.workspaces') -Force; # Home structure $homePath = Join-Path $basePath 'home' New-Item -ItemType "Directory" -Path $homePath -Force; New-Item -ItemType "Directory" -Path (Join-Path $homePath 'trash') -Force; New-Item -ItemType "Directory" -Path (Join-Path $homePath 'dump') -Force; New-Item -ItemType "Directory" -Path (Join-Path $homePath 'temp') -Force; New-Item -ItemType "Directory" -Path (Join-Path $homePath 'public') -Force; # Private section $privatePath = Join-Path $homePath 'private' New-Item -ItemType "Directory" -Path $privatePath -Force; New-Item -ItemType "Directory" -Path (Join-Path $privatePath 'backups') -Force; # Global section $globalPath = Join-Path $homePath 'global' New-Item -ItemType "Directory" -Path $globalPath -Force; New-Item -ItemType "File" -Path (Join-Path $globalPath 'Diary.md') -Force; # Dev section $devPath = Join-Path $globalPath 'dev' New-Item -ItemType "Directory" -Path $devPath -Force; New-Item -ItemType "File" -Path (Join-Path $devPath 'Scratchpad.md') -Force; New-Item -ItemType "Directory" -Path (Join-Path $devPath 'tickets') -Force; New-Item -ItemType "Directory" -Path (Join-Path $devPath 'projects') -Force; New-Item -ItemType "Directory" -Path (Join-Path $devPath 'repositories') -Force; New-Item -ItemType "Directory" -Path (Join-Path $devPath 'middleware') -Force; # GitHub root $githubPath = Join-Path $sourcePath 'github' New-Item -ItemType "Directory" -Path $githubPath -Force; New-Item -ItemType "Directory" -Path (Join-Path $githubPath "$env:username") -Force; # Others... # New-Item -ItemType "Directory" -Path (Join-Path $sourcePath 'vsts') -Force # New-Item -ItemType "Directory" -Path (Join-Path $sourcePath 'bitbucket') -Force # New-Item -ItemType "Directory" -Path (Join-Path $sourcePath 'gitlab') -Force # New-Item -ItemType "Directory" -Path (Join-Path $sourcePath 'assembla') -Force
[!TIP]
%USERPROFILE%
=$env:userprofile
=$HOME
=~
> e.g.C:\Users\MyUser
-
Add-QuickPins
add-quickpins.ps1
$paths = @( "$env:userprofile\Source", "$env:userprofile\Source\local\!nuget", "$env:userprofile\.nuget", "$env:AppData\npm", "$env:userprofile\.docker\volumes" ); $o = New-Object -ComObject Shell.Application; foreach ($path in $paths) { if (-not (Test-Path $path)) { New-Item -ItemType Directory -Path $path -Force | Out-Null; } $folder = $o.Namespace($path) if ($null -ne $folder) { $folder.Self.InvokeVerb("pintohome"); } }
-
-
Check if
WinGet
is installed on your system.Get-Command winget; winget source update;
if throws an error, install it from the link below
https://github.com/microsoft/winget-cli/releases/latestrun the command below to identify if you have any package that needs update
winget upgrade;
-
Check if
PowerShell
is installed on your system.[!TIP] Windows PowerShell (also known as
powershell
is the default shell for Windows and has blue icon, while PowerShell (also known aspwsh
) is a cross-platform shell and has black icon.
$profile
will give you the path of the profile file for the current shell.-
Windows PowerShell profile file is located at
~\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
-
PowerShell profile file is located at
~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
Get-Command pwsh;
if throws an error, run the command below to install it
winget install --id Microsoft.Powershell;
[!NOTE] Now on we will only use
pwsh
command to refer toPowerShell
. -
Windows PowerShell profile file is located at
-
Check if
Windows Terminal
is installed on your system.Get-Command wt;
if throws an error, run the command below to install it
winget install --id Microsoft.WindowsTerminal;
-
Check if
OhMyPost
is installed on your system.Get-Command oh-my-posh;
if throws an error, run the command below to install it
winget install --id JanDeDobbeleer.OhMyPosh;
post-installation_ohmypost.ps1
Install-Module -Name Terminal-Icons -Repository PSGallery -Force;
$ohMyPoshFilePath = "$env:userprofile\source\local\docs\oh-my-posh-theme.omp.json";
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/wiki/cilerler/cilerler.github.io/documents/oh-my-posh-theme.omp.json" -OutFile $ohMyPoshFilePath;
$profilePath = $PROFILE;
# Ensure the profile file exists
if (-not (Test-Path $profilePath)) {
New-Item -ItemType File -Path $profilePath -Force | Out-Null;
}
# Define the lines to append
$linesToAdd = @"
function prompt
{
return;
}
Import-Module -Name Terminal-Icons;
oh-my-posh --init --shell pwsh --config "$ohMyPoshFilePath" | Invoke-Expression;
"@
# Check if the lines already exist to avoid duplicates
if (-not (Get-Content $profilePath | Select-String 'oh-my-posh')) {
Add-Content -Path $profilePath -Value $linesToAdd;
}
Tip
More info can be found here
-
Check if "Git" is installed on your system.
Get-Command git;
if throws an error, run the command below to install it
winget install --id Git.Git;
-
You may find the rest of the application list I use at here
Visual Studio
-*.vssscc;-*.vspscc;-*.dbmdl;-bin\;-obj\;-.git\;-.vs\;-TestResults\;-node_modules\;-bower_components\;-typings\
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global fetch.prune true
git config --global init.defaultBranch "main"
git config --global core.editor "code --wait"
git config --global diff.tool bc;
git config --global difftool.bc.path "$env:LOCALAPPDATA/Programs/Beyond Compare 5/bcomp.exe";
git config --global merge.tool bc;
git config --global mergetool.bc.path "$env:LOCALAPPDATA/Programs/Beyond Compare 5/bcomp.exe";
Install-Module -Name SqlServer
dotnet tool install --global apiport;
dotnet tool install --global aspirate;
dotnet tool install --global azuresigntool;
dotnet tool install --global docfx --version "3.0.0-*" --add-source https://docfx.pkgs.visualstudio.com/docfx/_packaging/docs-public-packages/nuget/v3/index.json;
dotnet tool install --global dotnet-aspnet-codegenerator;
dotnet tool install --global dotnet-counters;
dotnet tool install --global dotnet-ef;
dotnet tool install --global dotnet-outdated-tool;
dotnet tool install --global dotnet-project-licenses;
dotnet tool install --global dotnet-sql-cache;
dotnet tool install --global git-flow-version;
dotnet tool install --global gitversion.tool;
dotnet tool install --global microsoft.dotnet-interactive;
dotnet tool install --global microsoft.dotnet.mage;
dotnet tool install --global microsoft.odata.cli;
dotnet tool install --global microsoft.openapi.kiota;
dotnet tool install --global microsoft.sqlpackage;
dotnet tool install --global microsoft.sqlserver.sqltoolsservicelayer.tool;
dotnet tool install --global plantumlclassdiagramgenerator;
dotnet tool install --global try-convert;
dotnet tool install --global upgrade-assistant;
$fileContext = @"
@echo off
CALL npm install -g firebase-tools
CALL npm install -g @angular/cli
"@;
$fileContext | Out-File -FilePath "$env:APPDATA\npm\install.cmd";
$fileContext = @"
@echo off
ECHO -=[NODE]=-
CALL node -v
ECHO -=[NPM]=-
CALL npm -v
ECHO -=[FIREBASE]=-
CALL firebase --version
ECHO -=[NG]=-
CALL ng version
"@;
$fileContext | Out-File -FilePath "$env:APPDATA\npm\versions.cmd";
$fileContext = @"
@echo off
CALL npm install -g firebase-tools
CALL npm uninstall -g @angular/cli
CALL npm cache verify
CALL npm install -g @angular/cli@latest
"@;
$fileContext | Out-File -FilePath "$env:APPDATA\npm\upgrade.cmd";
- Visual Studio
- BeyondCompare
- FileZilla
- Remote Desktop connections
- Daemon Tools $ | Alcohol %120 $