Author Posts

August 6, 2014 at 10:19 am

I'm having a really hard time making a script which contains 4 functions which will automatically draw a box menu and change your TCP/IP settings from static to DHCP or vice versa.

Create a Set-DHCP function to enable DCHP on the local computer
Create a Set-StaticIP function to change from DHCP to static addressing.
Make sure to SetDynamicDNSRegistration to “false”.

If anyone can help, that will be greatly appreciated. THANKS

The menu should look like this below.

August 6, 2014 at 10:21 am

Which bit, exactly, are you having problems with?

August 6, 2014 at 10:21 am

Hello, You appear to have only attached an image.

August 6, 2014 at 11:28 am

Rocking the ASCII art menus! Takes us back to 1990...

These days, why bother with all the lines and blocks? If you want a GUI, there are much nicer options. Modern command-line scripts and utilities rarely go to the trouble of that sort of menu.

The PowerShell Host has a built-in PromptForChoice method which you might like. It's what gets used when you set one of the action preference variable to 'Confirm', and so on. Check out for an example of it. (In PowerShell.exe, this will be a command-line prompt. In the ISE, it's a GUI pop-up.)

August 6, 2014 at 12:43 pm

Problems with all of the steps. I know, I'am an amateur to coding via Powershell but my strength is in Linux. I just started doing windows administration.

Dave that was and excellent source you provided me, only issue is I must use ASCII to create the menu.

August 6, 2014 at 1:22 pm

This is the guideline I must follow.

August 6, 2014 at 2:53 pm

I got a friend to help me out.