Skip to content

you need to add pause at the end of your .ps1 file, so the user can see the output #12193

Closed
@nonverbalbychoice

Description

@nonverbalbychoice

Type of issue

Code doesn't work

Feedback

you need to add pause at the end of your .ps1 file, so the user can see the output

it should be

Get-Service -Name W32Time
pause

also, it's not very clear what you mean by this line of code

.\Get-TimeService.ps1

i'm not sure what this does
i tried entering it in all different ways. and yes, i already created my .ps1, and i had navigated to the folder it was in

Page URL

https://learn.microsoft.com/en-us/powershell/scripting/learn/ps101/01-getting-started?view=powershell-7.5

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs/blob/main/reference/docs-conceptual/learn/ps101/01-getting-started.md

Author

@sdwheeler

Platform Id

13fd0525-0543-5a36-fec7-9afd95255ec2

Document Id

c2a54962-1511-7f87-24c5-f39b61f923bb

Metadata

Metadata

Assignees

No one assigned

    Labels

    resolution-answeredStatus - closed by existing documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions