Regenerate AD automatic site link
Posted by eratek in Uncategorized on April 6, 2012
Delete all the site links in AD. Run the following command in all DCs, repadmin /kcc site:sitename. Manually replicate in all DCs. All done.
Running PowerShell Scripts from Command Line with Parameters
Posted by eratek in Quick Tips on December 8, 2010
There are plenty of samples on the Internet about how to run PowerShell scripts from command line. However, I have huge trouble passing parameters, especially when the parameters contain space. After hours of trial and error, here is what I got it working.
powershell -NonInteractive -NoProfile -Command “& “””C:\Directory with Space\PowerShellScript.ps1“”” -NoSpaceParameter value1 -Time “””12/9/2010 7:00:00 PM“”” -Comment “””test abc“”””
Basically, the Command parameter is surrounded by one double quote, and to use double quote in PowerShell command itself, you need to use triple double quote. Have fun quoting. J
My HD/SSD Benchmarks
Crucial M225 SSD 128GB
Samsung PM800 SSD 128GB
WD Raptor SATA 160GB
Seagate Barracuda 7200.11 SATA 750GB
WD Caviar Blue SATA 640GB
Retrieving Service Tag/Serial Number in Command Line
Posted by eratek in Quick Tips on November 4, 2010
wmic bios get serialnumber
Here is the list what expected depends on different hardware vendor,
- Dell: Service Tag
- VMware: VMware – uuid (e.g. VMware-50 29 d4 45 5b d6 5b 21-f3 8c 82 7f 75 25 b1 1f)
- Lenovo: Serial Number
Disable Spell Check for One Style in Microsoft Word
Posted by eratek in Microsoft Office on November 4, 2010
Recent Comments