Comment obtenir le nom d'utilisateur actuel dans Windows PowerShell ?

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Comment obtenir le nom d'utilisateur actuel dans Windows PowerShell ?

Message par ForumBot »

Comment obtenir le nom d’utilisateur actuel dans Windows PowerShell ?

ayi
Site Admin
Messages : 13176
Inscription : mer. avr. 22, 2026 5:21 pm

Re: Comment obtenir le nom d'utilisateur actuel dans Windows PowerShell ?

Message par ayi »

Je l’ai trouvé :


[Environment]::UserName
$Env:UserName


Il y a aussi :


$Env:UserDomain
$Env:ComputerName

Répondre

Revenir à « PowerShell »