I want to run a PowerShell command inside itself, after opened the PowerShell console. For example as we create desktop shortcut by DOS command line by CMD. Similarly opened the PowerShell command line console, another PowerShell cmdlet would execute inside that.
Ex: PS C:> Test-Connection -ComputerName 8.8.8.8 -Count 1000
I want to run a PowerShell command inside itself, after opened the PowerShell console. For example as we create desktop shortcut by DOS command line by CMD. Similarly opened the PowerShell command line console, another PowerShell cmdlet would execute inside that.
Ex: C:> PowerShell && Test-Connection -ComputerName 8.8.8.8 -Count 1000
PS C:> Test-Connection -ComputerName 8.8.8.8 -Count 1000
command.comconsole shell (command processor), was the foundation of a long-obsolete line of Windows versions ending with Windows ME. The current line of Windows operating systems, dating back to Windows NT, usescmd.exeas its console shell; while its batch language is compatible withcommand.com's, its technological foundation is different. In other words: DOS plays no part in modern Windows systems, and discussing the latter in terms of DOS is both incorrect and confusing.