A nice, well-presented video. Yes, it is useful. How do you run a .ps1 script that resides on the computer I use to reach the server? Via enter-PSSession or new-PSSsession?
It depends. Within your script you may want to look at using Invoke-Command which can accept multiple targets for the -ComputerName parameter. What tasks will your script be doing?
I see. If you're wanting to run the script from your own computer, it seems like having Invoke-Command statements in your script would work. Though, there's nothing stopping you from creating new PowerShell sessions as a part of the script's execution.
@@EddieJennings Hello Eddie. May I ask you something? Is it a feasible idea to set up an all virtual network of computers: virtual Win server 2019 + 2-3 Win 10 PCs as clients. This network would run on a Win server 2019 (hyperV) that is installed on a physical machine. Why? To practice PowerShell remoting, virtual services, AD DS. I need a network to practice these operations and I don't have so many physical PCs. Thank you for your advice.
4:00 Using Domain Administrator's account to logon to member servers is a bad practice. This cause leaving domain admin's credentials on the servers LSA, which is the 1st place to go for by adversaries. A compromise of a member server will lead to a compromise of a whole domain = game over. Domain admin accounts should be used only for access to domain servers. Domain administrators should be revoked access from member servers.
I always suggest learn by doing, in particular for PowerShell. Consider a task you do in your environment consistently, and see how it can be made into a script. As you develop that script, you study and learn how the cmdlets work. You may find this video and playlist helpful. th-cam.com/video/L5PlrQQRg0k/w-d-xo.html th-cam.com/play/PLgYy5YCbiYbH6BiYYFhgs-9t3S_kB2x5G.html
A nice, well-presented video. Yes, it is useful. How do you run a .ps1 script that resides on the computer I use to reach the server? Via enter-PSSession or new-PSSsession?
It depends. Within your script you may want to look at using Invoke-Command which can accept multiple targets for the -ComputerName parameter. What tasks will your script be doing?
@@EddieJennings Requests info on the remote computer, create users and folders.
I see. If you're wanting to run the script from your own computer, it seems like having Invoke-Command statements in your script would work. Though, there's nothing stopping you from creating new PowerShell sessions as a part of the script's execution.
@@EddieJennings PSSession seems easier as you suggest to work (run scripts) directly on the remote computer. Thanks
@@EddieJennings Hello Eddie. May I ask you something? Is it a feasible idea to set up an all virtual network of computers: virtual Win server 2019 + 2-3 Win 10 PCs as clients. This network would run on a Win server 2019 (hyperV) that is installed on a physical machine. Why? To practice PowerShell remoting, virtual services, AD DS. I need a network to practice these operations and I don't have so many physical PCs. Thank you for your advice.
4:00 Using Domain Administrator's account to logon to member servers is a bad practice. This cause leaving domain admin's credentials on the servers LSA, which is the 1st place to go for by adversaries. A compromise of a member server will lead to a compromise of a whole domain = game over.
Domain admin accounts should be used only for access to domain servers. Domain administrators should be revoked access from member servers.
Hi Eddie
Please suggest me how to learn powershell and remember the commands effectively
I always suggest learn by doing, in particular for PowerShell. Consider a task you do in your environment consistently, and see how it can be made into a script. As you develop that script, you study and learn how the cmdlets work.
You may find this video and playlist helpful.
th-cam.com/video/L5PlrQQRg0k/w-d-xo.html
th-cam.com/play/PLgYy5YCbiYbH6BiYYFhgs-9t3S_kB2x5G.html
@@EddieJennings Thank You Eddie Will you provide or suggest any book to develope my powershell skill
I've heard good things about the Month-of-Lunches series, for which there is a PowerShell book. I, myself, haven't used an official PowerShell book.
Has to be an easier way to remotely re-start a machine ..