In PowerShell, you can use the Get-CimInstance cmdlet to get the system startup time. Here's an example:
$startupTime = (Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime
$startupTime = Get-Date -Date $startupTime
$startupTime.ToString()
This will display the startup time of the system in the format "MM/dd/yyyy hh:mm:ss tt"
You can also use the wmi object to get the same information
$startupTime = (get-wmiobject -class win32_operatingsystem).ConvertToDateTime((get-wmiobject -class win32_operatingsystem).lastbootuptime)
$startupTime.ToString()
You can also use this command to get the startup time in different format
(Get-CimInstance -ClassName Win32_OperatingSystem).LastBootUpTime
This will display the startup time in the format "yyyymmddHHMMSS.ssssss+zzzz"
You can use the Select-Object cmdlet to select the specific property you want, such as ConvertToDateTime(LastBootUpTime) to convert the date time to a more readable format.
(Get-CimInstance -ClassName Win32_OperatingSystem) | Select-Object -Property ConvertToDateTime(LastBootUpTime)
Please note that the above commands works on Windows PowerShell and PowerShell 5.1 and above.
Let me know if you have any questions or need further assistance.