Beginner-friendly tutorial on PowerShell remoting

Поделиться
HTML-код
  • Опубликовано: 19 авг 2024
  • Welcome to our beginner-friendly tutorial on PowerShell remoting! In this video, we'll introduce you to two essential cmdlets: Invoke-Command and Enter-PSSession, which will open up a whole new world of remote administration possibilities.
    With Invoke-Command, you'll learn how to execute commands and scripts on remote machines effortlessly. We'll walk you through the basics of targeting specific computers or groups, passing parameters, and retrieving results. This cmdlet is a fantastic tool for automating tasks across multiple machines without leaving your desk!
    Next, we'll explore Enter-PSSession, a command that allows you to interactively manage remote machines. Step into the remote machine's environment and gain real-time control, as if you were sitting in front of it. You'll discover how to navigate file systems, run commands, and manage remote sessions with ease.
    Throughout the tutorial, we'll provide practical examples and tips to ensure you grasp the fundamental concepts of PowerShell remoting. By the end, you'll have a solid foundation to start leveraging these powerful cmdlets for basic remote administration tasks.
    Whether you're new to PowerShell or have some experience, this tutorial is designed to give you a strong introduction to remoting. So grab your coffee, sit back, and get ready to enhance your productivity by harnessing the power of PowerShell remoting with Invoke-Command and Enter-PSSession. Let's dive in and unlock the possibilities of remote administration!

Комментарии • 41

  • @binaryblog
    @binaryblog 7 месяцев назад +3

    Very well explained. Kudos for explaining why you have to put get-credential into brackets.

    • @mwcloud
      @mwcloud  6 месяцев назад

      Thank for taking the time to watch

  • @pranilraut6525
    @pranilraut6525 2 месяца назад +1

    Very clear explanation. Shared this video with my teammates who are struggling to get started with PowerShell

    • @mwcloud
      @mwcloud  2 месяца назад

      Thank you. I will do more eventually, just been busy with other work

  • @Abhi_ThePrOblemSOlver
    @Abhi_ThePrOblemSOlver 6 дней назад

    Explanation is too good.💯

    • @mwcloud
      @mwcloud  6 дней назад

      Thank you. Remember to sub and watch my other content too

    • @Abhi_ThePrOblemSOlver
      @Abhi_ThePrOblemSOlver 5 дней назад +1

      ​@@mwcloudYes i already did that.

    • @mwcloud
      @mwcloud  5 дней назад

      @@Abhi_ThePrOblemSOlver Thank you, I appreciate it.

  • @KL2GW
    @KL2GW Год назад +3

    OH MAN!!!! Thank You, Thank You, Thank You!!! I was getting stuck and kept getting Access Denied. WoW This Really Helped me!! KUDOS

    • @mwcloud
      @mwcloud  Год назад

      You are welcome!

  • @luisevidal
    @luisevidal 4 месяца назад +1

    Outstanding explanation, mate. Thanks!

  • @kafkakos3618
    @kafkakos3618 Месяц назад +1

    Cheers Mike. - keep them coming .

  • @Matthew__Hawk
    @Matthew__Hawk 5 месяцев назад

    Very helpful! Broke it down for me and fully understood on the first go around!

    • @mwcloud
      @mwcloud  5 месяцев назад

      No problem, check out some of my other content too. Every sub is more encouragement to make more

  • @srinivas1623
    @srinivas1623 11 дней назад

    Thanks Mike

  • @patrick__007
    @patrick__007 Год назад +1

    Love your content. Keep up doing this🎉

    • @mwcloud
      @mwcloud  Год назад +1

      Thank you. I’m trying to improve the editing each time

  • @UzairAli001
    @UzairAli001 Год назад +2

    Love it ❤

  • @pimenjc
    @pimenjc 14 дней назад

    MUITO OBRIGADO.

  • @grachit999
    @grachit999 5 месяцев назад

    How do I set a computer name here (like you're setting up DC). There must be some way to set it up so that local machine will recognize the machine running behind DC. Got below error:
    Invoke-Command -ComputerName DC -ScriptBlock {get-date}
    [DC] Connecting to remote server DC failed with the following error message : WinRM cannot process the request.
    + CategoryInfo : OpenError: (DC:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : NetworkPathNotFound,PSSessionStateBroken

    • @mwcloud
      @mwcloud  5 месяцев назад

      Just use the name of the computer you are trying to connect to in your domain

  • @hulstie
    @hulstie 5 месяцев назад

    Getting the following error. I have proper creds/perms, same domain, winRM configured properly. Any suggestions?
    PSRemotingTransportException
    + FullyQualifiedErrorId : ServerNotTrusted,PSSessionStateBroken

    • @mwcloud
      @mwcloud  5 месяцев назад +1

      You need to set trusted hosts on the thing you are connecting from

  • @procc.
    @procc. 5 месяцев назад

    Is there any tutorial how to enable remote powershell in remote pc's?

    • @mwcloud
      @mwcloud  5 месяцев назад

      Enable it remotely so you can then remote to them with powershell ?

  • @prasadnetke
    @prasadnetke 11 месяцев назад

    Thank you that was the most Simplest and detailed one ,perfectly explained.
    I have one query though when I try using invoke command in my prod environment it gives me an error stating WINRM can not connect via Http/Https. I am not allowed to make any changes to existing setup can you tell me a work around for this?

    • @mwcloud
      @mwcloud  11 месяцев назад

      There isn’t one. If remote access is blocked in your environment by a higher admin. Then it’s blocked.

  • @deadjoke
    @deadjoke Год назад

    Yet, the SOC teams says it’s a security risk to enable windows remote management

  • @alainsabum
    @alainsabum Месяц назад

    Do
    You have a course

    • @mwcloud
      @mwcloud  Месяц назад

      Yes I do, i offer them privately and they are 5 days long, remotely or in person, you can contact me on my website should you want to enquire

    • @alainsabum
      @alainsabum Месяц назад

      @@mwcloud what’s your site

    • @mwcloud
      @mwcloud  Месяц назад

      @@alainsabumits on the channel homepage

  • @michaelxz1305
    @michaelxz1305 14 дней назад +1

    this is light years ahead of a thick Indian accent (common on IT videos but so distracting)

  • @emrelabarjr6803
    @emrelabarjr6803 3 месяца назад

    I liked the video, but i could not seem to get what's in the brackets after the scriptBlock to work....
    $cn = $env:computername
    $un = $env:username
    $date = (Get-Date).ToString("yyyy-MM-dd")
    Invoke-Command -ComputerName Laptop -ScriptBlock {powercfg -batteryreport -output \\computer\d$\PowercfgFiles\${date}\${cn}_${un}_battery_report.html /duration 14}
    this works but puts the file on the local machine. i was trying to get the output to a different PC
    Invoke-Command -ComputerName Laptop -ScriptBlock {powercfg /Batteryreport}

    • @mwcloud
      @mwcloud  3 месяца назад

      you have run into what is called the "powershell double hop problem" your session cannot pass the creds you used to another session, that other session in this case is the SMB share connection. It is too much to explain here, but google 'powershell double hop problem' and it will put you on the right track. You need to re-authenticate the SMB connection

    • @emrelabarjr6803
      @emrelabarjr6803 3 месяца назад

      @@mwcloud Thanks! i will look into that tomorrow.