About 367,000 results
Open links in new tab
  1. powershell - How to fix "running scripts is disabled on this system ...

    Nov 1, 2020 · In powershell # To check the current execution policy, use the following command: Get-ExecutionPolicy # To change the execution policy to Unrestricted, which allows running any script without digital signatures, use the following command: Set-ExecutionPolicy Unrestricted # This solution worked for me, but be careful of the security risks involved.

  2. What does $_ mean in PowerShell? - Stack Overflow

    Aug 16, 2010 · If you break down powershell to basics then everything is a script block including a script file a, functions and cmdlets. You can define your own parameters but in some occasions one is created by the system for you that represents the input item to process/evaluate. In those situations the automatic variable is $_.

  3. How to sudo on powershell on Windows - Stack Overflow

    Mar 23, 2019 · 59 Whenever I need to run a powershell script it complains of security, if I add powershell.exe -nologo -executionpolicy bypass -File .\install.ps1 I still get permission denied unauthorizedAccessException. I just want to run this install script, what is the sudo equivalent to type on the powershell on windows? Edit:

  4. Get Folder Size from Windows Command Line - Stack Overflow

    Jul 2, 2016 · Is it possible in Windows to get a folder's size from the command line without using any 3rd party tool? I want the same result as you would get when right clicking the folder in the windows explo...

  5. powershell - How to pass credentials to the Send-MailMessage …

    Sep 17, 2012 · I'm having difficulty passing my credentials to the Send-MailMessage command This is what I am running: Send-MailMessage -smtpServer smtp.gmail.com -from '[email protected]' ` -to 'myself@gmai...

  6. What does the "@" symbol do in PowerShell? - Stack Overflow

    Dec 12, 2008 · I've seen the @ symbol used in PowerShell to initialise arrays. What exactly does the @ symbol denote and where can I read more about it?

  7. What does the & symbol in powershell mean? - Stack Overflow

    Feb 27, 2014 · What does the & symbol in powershell mean? Asked 11 years, 5 months ago Modified 3 years, 9 months ago Viewed 187k times

  8. Ternary operator in PowerShell - Stack Overflow

    Jul 10, 2015 · From what I know, PowerShell doesn't seem to have a built-in expression for the so-called ternary operator. For example, in the C language, which supports the ternary operator, I could write somet...

  9. PowerShell guidelines for -Confirm, -Force, and -WhatIf

    19 Are there any official guidelines from Microsoft about when to add -Confirm, -Force, and -WhatIf parameters to custom PowerShell cmdlets? There doesn't seem to be a clear consensus about when/how to use these parameters. For example this issue. In the absence of formal guidelines, is there a best practice or rule of thumb to use?

  10. Loop through files in a directory using PowerShell

    Sep 3, 2000 · How can I change the following code to look at all the .log files in the directory and not just the one file? I need to loop through all the files and delete all lines that do not contain "step4" ...