Screen Buffer Size :
Width = 180
Heigth = 300
Windows Size :
Width = 180
Heigth =80
- Chargement des ADCmdlets
Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
- Definier vos alias
New-item -path alias:nmap -value 'c:\Program Files\Nmap\nmap.exe'
( ici j'ai installé l'outils nmap)
- Voici comment avoir un prompt Unix-Like
function prompt() { #$num = (get-history -count 1).id + 1 $path2 = (Get-Location).path $promptText = (get-content env:\username) + '@' + (Connect-QADService).domain.name + ':' + $path2 $promptText = "$promptText>" write-host $promptText -NoNewline -foregroundcolor "green" $host.UI.rawUI.WindowTitle = (get-location).Path; return ' ' }
- et un petit peu de custo :
cls write-host "__________ .__ .__ .__ " write-host "\______ \______ _ __ ___________ _____| |__ ____ | | | | " write-host "| ___/ _ \ \/ \/ // __ \_ __ \/ ___/ | \_/ __ \| | | | " write-host " | | ( <_> ) /\ ___/| | \/\___ \| Y \ ___/| |_| |__" write-host " |____| \____/ \/\_/ \___ >__| /____ >___| /\___ >____/____/" write-host " \/ \/ \/ \/ " write-host "Command :" write-host "nmap " cd c:\pwshell