July 13, 2020 at 10:55 am #242114ParticipantTopics: 1Replies: 0Points: -9Rank: Member
This is kind of a 2 part question, so I’ll start with the first one. Is there a way to convert this Batch command to Powershell?
set /P “ClientNo=Enter Client Number:”
igrant.exe -r -f -usepriv mydomain\Admin:Full C:\Data\Hosted\Company%ClientNo%\Profiles\
July 13, 2020 at 11:37 am #242123ParticipantTopics: 5Replies: 2413Points: 6,202Rank: Community MVP
Nick, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.
When you post code, error messages, sample data or console output format it as code, please.
In the “Text” view you can use the code tags “CODE“, in the “Visual” view you can use the format template “Preformatted“. You can go back edit your post and fix the formatting – you don’t have to create a new one.
Thanks in advance.
This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.
You should read the help including the examples for Read-Host. That’s the cmdlet we use to ask for user input in Powershell. When you safe the output of
Read-Hostto a variable – lets say with the name
$ClientNoyou just have to change the variable name in your command line an it should work.
- You must be logged in to reply to this topic.