none
Windows 10, August 2018 and Powershell RRS feed

  • General discussion

  • Hi,

    I use PowerShell every day. I just upgraded my Windows 10 1803 and a secondary Windows 10 1709 machines to the latest comulative update. What I have noticed is that it has broken all of my Powershell functions. 

    Any ideas why or how I would go about fixing it? What I noticed is that the Windows cumulative update ended up upgrading the powershell version as well. 

    Welder

    <edited to remove extra HTML junk added by "Grammerly" browser addon>
    • Edited by AgentWelder Friday, August 24, 2018 8:54 PM
    • Changed type Bill_Stewart Wednesday, December 12, 2018 8:15 PM
    • Moved by Bill_Stewart Wednesday, December 12, 2018 8:15 PM User error
    Thursday, August 23, 2018 6:30 PM

All replies

  • 1) Your post is not readable and cluttered with what appears to be some kind of junk HTML.

    2) This is not a Windows OS break/fix forum. This is a scripting Q&A forum.


    -- Bill Stewart [Bill_Stewart]

    Thursday, August 23, 2018 8:40 PM
  • Hi,

    I don't understand why its adding all that extra stuff. I just switched browsers and it seem to work now. Maybe a new Chrome addon messing with it. I will troubleshot on my own and clean up the previous one if possible.

    Anyways, I still think that the post is relevant since the question is regarding the latest version of Powershell breaking all scripts. I think people will find themselves asking the same question. Why did all my powershell scripts break.

    • Edited by AgentWelder Friday, August 24, 2018 8:51 PM
    Friday, August 24, 2018 8:46 PM
  • You're going to have to post more information about your problem. What specifically isn't working, and specifically how isn't it working?

    -- Bill Stewart [Bill_Stewart]

    Friday, August 24, 2018 9:01 PM
  • It looks like I figured out the problem. I was not defining the function as one, and it seems like the latest version of Powershell is more strict about that.

    Before I had:

    Search{  
    Do {  
    If ($exitcondition.StartWith(("s"))) {  
    Search 
    }
    If ($exitcondition.StartWith(("c"))) {  
    Connect
    } Until ($exitcondition.StartWith(("e")))
    }
    Search
    

    Now I am having to correctly define Search as a function "Function Search()" for it to work. I didn't have to do that before, now I am. I will have to sign up for a blog or news letter to keep track of Powershell updates for these types of changes in the future.

    Friday, August 24, 2018 9:50 PM
  • We would definitely recommend reading up on PowerShell basics and syntax before trying to write your own functions or scripts.


    -- Bill Stewart [Bill_Stewart]

    Friday, August 24, 2018 10:15 PM