Tag Archives: powershell

PowerShell i loop kroz spisak servera

Dobri linkovi : link1, link2 I evo PS skriptića koji vrti petlju sa dva člana : param( [string]$pauza = “———-” ) $spisakservera = @(“mojserver1.mojdomen”,”mojserver2.mojdomen”) for ($i=0; $i -lt 2; $i++) { $pauza $spisakservera[$i] $pauza Invoke-SQLCmd -query “select name, size*8/1024 AS … Continue reading

Posted in Windows | Tagged , , | Leave a comment

Definicija parametara za PowerShell

[int]$variable # 32-bit integer mit Vorzeichen [long]$variable # 64-bit integer mit Vorzeichen [string]$variable # string mit unicode characters [char]$variable # A unicode 16-bit character [byte]$variable # 8-bit Zahl [bool]$variable # Boolean True/False [decimal]$variable # 128-bit Dezimalzahl [single]$variable # Single-precision 32-bit … Continue reading

Posted in Windows | Tagged , , , | Leave a comment

PowerShell skripta za podatke o MS SQL serveru i bazi

U celu situaciju su umešani i SQL Server Management Objects (SMO) koji se mogu koristiti i iz PowerShell-a. Koristim komandu invoke-sqlcmd kojom iz PS-a prizivam SQL komande (link). 0. Sve radim iz PowerShell-a u koji sam logovana sa nalogom domenskog … Continue reading

Posted in Windows | Tagged , , , , | Leave a comment

CPU+RAM(%) na udaljenom serveru iz CLI

To mi treba ko leba 🙂 CPU Nisam našla baš klasičan CLI, ali jesam iz PowerShell-a (link) : PS C:\Users\velda.ebel>Get-Counter -ComputerName localhost ‘\Process(*)\% Processor Time’ | Select-Object -ExpandProperty countersamples | Select-Object -Property instancename, cookedvalue| Sort-Object -Property cookedvalue -Descending| Select-Object -First … Continue reading

Posted in Windows | Tagged , , | Leave a comment

WIN 7 I PowerShell

Treba da naučim nešto o PowerShell-u (uz WIN 7 ide PowerShell 2.0). Da bi PowerShell radio mora postojati I odgovarajuća instalacija za .Net Framework (u mom slučaju 2.0), a da bi PowerShell ISE radio treba mu .Net Framework 3.5 SP1. … Continue reading

Posted in Windows | Tagged , | Comments Off on WIN 7 I PowerShell

PowerShell i Linux

Šta je uopšte PowerShell (ili skraćeno POSH) : A shell is basically a user interface that gives you access to various services of an operating system. A shell can be command-line based or it can include a graphical user interface … Continue reading

Posted in Linux | Tagged | Comments Off on PowerShell i Linux