This blog is dedicated for Windows System Administration tips/techniques/scripts/tools to effectively and efficiently do tasks in our day to day activities in system administration profile.
Friday, January 24, 2020
Creating a Custom Catalog for Dell PowerEdge Servers using Dell Repository Manager
Wednesday, January 15, 2020
Install a bat file or cmd script as service on a Windows Server machine.
Install a bat file or cmd script as service on a Windows Server machine.
To install a Bat file or CMD script as a Service we would need a small Microsoft utility called srvany.exe which is part of the Windows Server 2003 Resource Kit tools and can be downloaded free from Microsoft Download center here.
Steps:
· Download Windows Server 2003 Resource Kit tools from here and install it on any server.
· Create a folder on your server ex C:\YourServiceName
· Just copy srvany.exe to C:\YourServiceName from the location where Resource Kit tools were installed (usually C:\Program Files (x86)\Windows Resource Kits\Tools\), after this step Windows Server 2003 Resource Kit tools can be uninstalled as it is no longer needed.
· Launch CMD as Administrator.
· Type following Command which will install a service named YourServiceName on the server
sc create YourServiceName binpath= C:\YourServiceName\srvany.exe DisplayName= "Your Service Name"
· Open Registry editor by Clicking Start > regedit
· Navigate to following location and right click and create a New key named YourServiceName
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YourServiceName
· Right Click on YourServiceName and Create another key named Parameters under that.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YourServiceName\Parameters
· Under Parameters Right Click in the righthand pane and select New String Value named Application Under that.
· Double Click the String Value named Application mention the Path of your bat file/cmd script there.
At this point we are done and we can now start the service and set the mode of the service to Automatic/Manual or whatever we want as per our need and the service will keep running which in background will run the Batch file/CMD Script continuously.
Thursday, January 9, 2020
Add/Edit content to a Windows Bootable ISO (Windows Server 2012 R2, Windows Server 2016, windows Server 2019)
- Mount the Windows Bootable ISO and copy everything to a temporary folder (Example C:\Temp) or extract the content of the ISO using 7Zip/WinRAR etc..
- Add files/folders content in the temporary folder where contents from ISO are extracted.
- Download ImgBurn from Here
- Install ImgBurn and launch it:
- Click on Create image file from files/folders
- Select the Folder where the content copied from ISO is copied and add it to Source pane.
- Select the destination where modified .ISO file will be written.
- Click on the Advanced Tab
- Select Bootable Disk Tab below
- Tick the Checkbox Make Image Bootable
- Select the boot file etfsboot.com from the boot folder of the location where you extracted the content of ISO originally.
- Mention 8 in sectors to load
- Finally Click on the Write button.