How can cmd script check for powershell environment? Solved

  1.    24 Dec 2018 #1

    How can cmd script check for powershell environment?


    I can execute script abc.cmd in either a command prompt or powershell environment/window.

    Can it determine the environment in which it runs?

    Powershell 5, W10Pro64, 1803

    Thank you and a Merry Christmas.
      My ComputerSystem Spec

  2. Ztruker's Avatar
    Posts : 7,242
    Windows 10 Pro X64 1809 17763.292
       24 Dec 2018 #2
      My ComputersSystem Spec


 

Related Threads
Hi. So I've been searching online on a way to do this yet I cannot find a way to do it. _______________________________________ I need this in specific: I want to double click a PowerShell script file (which will run as an administrator)...
https://www.howtogeek.com/338801/how-to-check-if-your-pc-is-protected-against-meltdown-and-spectre/ Curious if anyone has run this particular script having followed the directions in the article. I am modestly comfortable running PowerShell but...
One of many PowerShell security features is that you can't run a script simply by double clicking it's icon on desktop or in a folder. Doing so will by default open script in Notepad for editing instead. You can right click script and select Run...
A Powershell Script for HandBrake in Software and Apps
Here's the thing. My system is an age-old i3-530 overclocked to 3.5GHz coupled with GTX 1050 2GB. I have around 1.5TB of tutorial videos that I have to encode due to dearth in HDD space. I want to encode the videos while keeping the folder and...
Hope I'm in the right place! I am trying to get a Powershell script to run daily in the task scheduler. It basically purges a folder on one of my drives: Get-ChildItem –Path “D:\Dropbox\Quicken\Backup” –Recurse | Where-Object CreationTime...

Tags for this Thread

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:09.
Find Us