Powershell Tutorial Online


How to create Windows PowerShell session?
Why any would require powershell session? when working with remote computer, you would need to create the session object and using that session object
you can do multiple tasks on that computer like deployment.
Step 1: First we need create credential, which required for session

$cred = Get-Credential -Credential Domain\administrator

Step 2:Get-PSSession cmdlet
Enter-PSSession -ComputerName myComp -Credential $cred

Step 3: Remove-PSSession cmdlet removes unused PSSessions frees up resource.