User Tools

Site Tools


windows:pstriks

This is an old revision of the document!


Powershelltriks

Finn brukernavnet til en SID

$objSID = New-Object System.Security.Principal.SecurityIdentifier("ENTER-SID-HERE") 
$objUser = $objSID.Translate( [System.Security.Principal.NTAccount] ) 
$objUser.Value

Tail ekvivalent

Follow

Get-Content -Patch "<fil>" -Wait

Standard tail, print 10 siste

Get-Content <fil> | Select-Object -Last <lines>

Finn og drep prosesser

gps <string> | spps -Force
Get-Process -Name <string> | Stop-Process -Force

Kjør kommandoer på en remote server

Invoke-Command -ComputerName <navn> -ScriptBlock { Get-WhatNot }
windows/pstriks.1383393126.txt.gz · Last modified: (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki