25.února 2014

PC a internet Vzdálené spouštění PowerShell

Potřeboval jsem se vzdáleně ptát několika serverů na stav zálohování a žešil jsem, jak to udělat pomocí PowerShellu a tady začátek je řešení:

Na počítačích, kterých chci vzdáleně spouštět PowerShelové příkazy, je třeba vzdálný přístup pomocí WinRM povolit takto: (Je třeba to spustit v Powershellu, který je spuštěn jako administrator)

Enable-PSRemoting -Force

Na počítači, ze kterého chci PowerShellové příkazy spouštět, lze ověřit spojení takto:

Test-WsMan server

Vzdálený dotaz na stav zálohování udělám třeba takto:

Invoke-Command -ComputerName server -ScriptBlock {Add-PSSnapin windows.serverbackup; Get-WBSummary}

Vzdálenou session si spustím třeba takto:

Enter-PSSession -ComputerName server


Hledáte-li správce sítě nebo prostě nekoho kdo umí spravovat servery, hledejte na www.petr-hladis.cz

Přečteno: 5712x | Komentářů: 17x | Kategorie: PC a internet

Komentáře čtenářů

1. GRAVATAR - sokolik@sokolik.czSokolik26. 2. 2014 14:01:00
Pokud je potřeba spouštět soubory typu *.ps1, je třeba to nejprve v Powershellu povolit takto:

Set-ExecutionPolicy RemoteSigned
2. GRAVATAR - nefsreisy@benjaminmail.xyzSpoulse1. 9. 2022 2:45:00
<a href=https://cialisfstdelvri.com/>cialis on sale in usa</a> You had to get a physical piece of paper with a doctor s signature and deliver it to the pharmacy to obtain your meds

Reklama ETARGET:

3. GRAVATAR - AmattVomo@benjaminmail.xyzAmattVomo3. 9. 2022 6:35:00
You should not take this dose more than once per day <a href=http://buypriligyo.com/>priligy ebay</a>
4. GRAVATAR - unjurse@benjaminmail.xyzunjurse5. 9. 2022 4:42:00
<a href=http://vtopcial.com/>generic cialis no prescription</a> The most important benefit of taking Daily Cialis is that it will allow you to be ready for sex at a moment s notice
5. GRAVATAR - Oblispaps@benjaminmail.xyzOblispaps7. 9. 2022 7:11:00
Fertility In the treatment of dogs , decreased sperm production in the testes <a href=http://cheapcialiss.com/>purchasing cialis online</a>
6. GRAVATAR - intisrunc@benjaminmail.xyzintisrunc10. 9. 2022 4:43:00
129 Bromocriptine, a dopamine antagonist, inhibits meningioma cells significantly in vitro. <a href=https://clomida.com/>ovulation clomid calculator</a>
7. GRAVATAR - orderce@benjaminmail.xyzorderce13. 9. 2022 6:49:00
<a href=http://tamoxifenolvadex.com/>nolvadex buy</a> A wooden spatula was pressed against the pubic ramus depressing the suprapubic pad of fat as completely as possible to ensure that the part of the penis that is buried in the subcutaneous fat was measured.

Reklama ETARGET:

8. GRAVATAR - toreago@benjaminmail.xyztoreago16. 9. 2022 22:02:00
<a href=http://buydoxycyclineon.com/>how long does sun sensitivity last after doxycycline</a> Int J Lab Hematol.
9. GRAVATAR - geomire@benjaminmail.xyzgeomire7. 10. 2022 10:53:00
Journal of Pharmaceutical Sciences, 61 3, 379 385 <a href=https://buylasixon.com/>metolazone and lasix</a>
10. GRAVATAR - Empobgoma@benjaminmail.xyzEmpobgoma13. 10. 2022 3:02:00
Newcomer, and A <a href=http://bestcialis20mg.com/>buy cialis 5mg daily use</a>
11. GRAVATAR - plaubbida@benjaminmail.xyzplaubbida29. 10. 2022 10:58:00
There are different types of biomarkers, including pharmacogenomic biomarkers Court, 2007; Kirkwood and Hockett, 2002 <a href=http://stromectol.autos/>stromectol prescription</a>
12. GRAVATAR - Zootthory@newonlinemail.xyzZootthory8. 11. 2022 16:54:00
EMT is a typical feature of epithelial cancer cells undergoing to loss of their apico basal polarity and acquisition of mesenchymal features, typically accompanied by an increased vimentin expression and a decreased E cadherin and cytokeratin 18 expression <a href=http://priligy.me/>priligy price</a> This medication can cause side effects such as unwarranted weight gain, acne, hot flashes, sweating, voice changes, abnormal hair growth Hair structure, characteristics of growth and development Body vaginal dryness

Reklama ETARGET:

13. GRAVATAR - Quexerolo@benjaminmail.xyzQuexerolo10. 11. 2022 19:44:00
<a href=https://nolvadex.one/>tamoxifen weight gain</a> 55 While it is enticing to consider GH excess as an additional risk factor for the development of breast cancer in MAS, it is impossible to say at this point
14. GRAVATAR - duchthusy@barrettmail.xyzduchthusy17. 11. 2022 17:10:00
<a href=http://lasix.autos/>is lasix a water pill</a> Further examining subsets of chemotherapy treated patients revealed a remarkable survival advantage in those with TP53 mutant tumors who did not receive hormone therapy HT following chemotherapy and radiation in univariate Fig
15. GRAVATAR - addedetem@mailuk.siteaddedetem18. 11. 2022 12:28:00
The results from the present study showed that despite an increase in caspase 8 protease activity, no significant change was observed <a href=http://clomid.mom/>otc provera clomid</a> Some of his hobbies included fishing, hunting, and trapping
16. GRAVATAR - stirutt@newonlinemail.xyzstirutt19. 11. 2022 1:05:00
uterine arteriovenous malformations, cesarean scar defect <a href=http://stromectol.ink/>stromectol dosage</a>
17. GRAVATAR - Slaldycle@topmailnew.xyzSlaldycle19. 11. 2022 11:02:00
The initial treatment, especially chemotherapy, accounted for the largest part of total costs though the range in costs was wide <a href=https://doxycycline.world/>gonorrhea treatment doxycycline</a>

Reklama ETARGET:


Přidat vlastní komentář k článku



Z důvovů ochrany proti spamu prosím do následujícího políčka napište texy "NOSPAM":

Chcete-li ke komentáři přidat svou fotku nebo jinou ikonku, postupujte podle návodu.


TOPlist

[CNW:Counter]