Tag: Command line
-
Enable/Disable ipv6 in command line
By default IPv6 is not enabled on windows XP Pro and Windows Server 2003. However, its very easy to enable IPv6 with netsh (net shell) command line tool. Enable ipv6 netsh interface ipv6 install Disable ipv6 netsh interface ipv6 uninstall To verify if ipv6 is enabled, run ipconfig /all and see if ipv6 address is…
-
Run IIS in 32-bit mode on a 64 bit machine
IIS 7 / 7.5 / 8 On IIS 7 / 7.5 / 8, configure website or web application to run under 32 bit mode can be configured by opening a command prompt and typing following command and press ENTER. %windir%system32inetsrvappcmd set config -section:applicationPools -applicationPoolDefaults.enable32BitAppOnWin64:true You can achieve the same goal in IIS Manager by opening…
-
Install PowerShell From Command Line
To install PowerShell on Windows Server 2008 R2 or Hyper-V Server 2008 R2, following features needs to be installed. NetFx2-ServerCore NetFx3-ServerCore MicrosoftWindowsPowerShell Because Powershell is built on DotNet framework, DotNet 2.0 and 3.5 has to be installed prior to PowerShell installation. To install PowerShell from command line, run following from elevated command prompt DISM.exe /online…
-
Enable DotNet 3.5 from command line
To enable DotNet 3.5 from command line, run following from elevated command prompt dism.exe /online /enable-feature /featurename:NetFx3
-
Access denied when creating a folder just deleted
I have a batch script which remove a folder and re-create it. The command that remove a folder is rd /s/q and the command create folder is mkdir. Recently I see something weird happening, everytime when the folder is deleted and re-created, there is error message Access is denied displayed. However, if I rerun the…
-
Batch Script Tips
Getting the current working directory cd /d %~dp0 Comment: %0 is the name of the batch file. ~dp gives you the drive and path.
-
Control panel applets
Control panel applets (.CPL) is a shortcut to launch administrator tools quickly. These are some that used frequently after new OS is setup. intl.cpl – Regional and Language Options timedate.cpl – Date and Time Properties inetcpl.cpl – Internet Properties ncpa.cpl – Network Connections powercfg.cpl – Power Options Properties
-
Disable standby/sleep
powercfg.exe is a windows built in tool to config power management. powercfg.exe is a command line utility, it’s easy to integrate powercfg.exe into scripts. Turn hibernation off powercfg -hibernate OFF Set the power configuration to High Performance powercfg -setactive 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c Set the absentia power scheme (the scheme used when no one is logged in) powercfg.exe…
-
Enable/disable the built-in administrator account
Enabling the built-in administrator account: net user administrator /active:yes Disabling the built-in administrator account: net user administrator /active:no Note: Must use an elevated command prompt for this command to work.