Get-ChildItem
-name | ForEach-Object { Move-Item $_ $_.replace("character to remove", "") }
Blog to share tips and tricks that I come across in my role as a Technical Architect at Knowledge Factory.
Monday, 14 October 2013
Remove character from folder name
Have you ever needed to remove a character from a bunch of folders? This Powershell script does the trick.
Monday, 7 October 2013
Unable to delete a DC - dcpromo error
Deleting a DC is most of the time a rather straightforward procedure but a few weeks ago i received the error message below trying to uninstall a customers DC.
"The operation failed because: the attempt at remote directory server serverx.customerdomain.local to remove directory server CN=ServerX,CN=Servers,CN =customerdomain, CN=Sites,C N=Configur ation...
was unsuccessful. "Access is denied"
The account which i was running dcpromo with was both Domain Admin and Enterprise Admin, i could ping the other DC's, i checked with ADSI edit that my account had the rights to delete the DC. Everything seemed ok.
So what was the problem? I had a look in Sites and Services and found the solution to my problem. The DC had the checkbox "Protect object from accidental deletion" ticked. I unchecked the tickbox and could then run the dcpromo without any problems.
"The operation failed because: the attempt at remote directory server serverx.customerdomain.local to remove directory server CN=ServerX,CN=Servers,CN
was unsuccessful. "Access is denied"
The account which i was running dcpromo with was both Domain Admin and Enterprise Admin, i could ping the other DC's, i checked with ADSI edit that my account had the rights to delete the DC. Everything seemed ok.
So what was the problem? I had a look in Sites and Services and found the solution to my problem. The DC had the checkbox "Protect object from accidental deletion" ticked. I unchecked the tickbox and could then run the dcpromo without any problems.
Friday, 4 October 2013
Windows Server 2008 R2 DHCP problem "The parameter is incorrect"
A few weeks ago I was decommissioning a domain controller which had the DHCP server role installed. When I tried to unauthorize the server I received the following error:
"The parameter is incorrect"
These are the steps that solved the problem:
"The parameter is incorrect"
- I verified that the server was authorized in Active Directory
- I verified that I had sufficient rights to unauthorize the server
These are the steps that solved the problem:
- Stop DHCP service
- Delete the DHCP server object from the DHCP console
- Re-add the DHCP server to the DHCP console
- Start the DHCP service
- Try again to unauthorize the DHCP server
Tuesday, 28 August 2012
Are Vmware afraid of Hyper-V 3.0?
For some odd reason skips now Vmware their yelled at pricing model, just as Microsoft releases Windows Server 2012. Interesting... :) (article in Swedish)
http://www.idg.se/2.1085/1.462441/vmware-slopar-utskalld-prismodell
http://www.idg.se/2.1085/1.462441/vmware-slopar-utskalld-prismodell
Monday, 21 May 2012
5 seconds of fame
A nice series of articles about System Center 2012 where i have a comment about news and enhanced integration in SCVMM 2012. (article in Swedish)
http://techworld.idg.se/2.2524/1.448493/system-center-skolan-lektion-2-en-narmare-titt
http://techworld.idg.se/2.2524/1.448493/system-center-skolan-lektion-2-en-narmare-titt
Tuesday, 21 February 2012
How to route between internal networks in Hyper-V
If you have a Hyper-V lab environment and want to make it a little more like a corporate network then you might want to set up multiple networks and routing between them. But how would you accomplish that? There are different ways to solve it as a Vyatta router (or any other small Linux firewall) or perhaps a Forefront TMG. The way that I chose and that's very simple, you can read about on the following page.
http://www.infotechguyz.com/server2008/hypervrouting.html
http://www.infotechguyz.com/server2008/hypervrouting.html
Monday, 20 February 2012
How to configure NTP server for Windows Server 2008 R2
To configure the NTP server in Windows is not exactly complicated, but because you get various different suggestions when googling I thought I would just write a short tutorial that I know works. Instruction is verified on Windows Server 2008 R2. What is needed is essentially three short lines:
Don't forget to disable time sync if you have virtual server.
Which NTP Server should you choose? Or should you choose several? Yes, redundancy is never wrong, and considering how easy it is to set up several, it is preferred. SP Technical Research Institute provides a free time sync service.
So, tell me. Give me an example. Coming below ...
Run the following in a elevated command prompt:
net start w32time
P.S. One tip is of course to check the system log afterwards to see that the time sync seems to work.
w32tm /config /manualpeerlist:pool.ntp.org,0x8 /syncfromflags:MANUAL net stop w32time net start w32time
Don't forget to disable time sync if you have virtual server.
Which NTP Server should you choose? Or should you choose several? Yes, redundancy is never wrong, and considering how easy it is to set up several, it is preferred. SP Technical Research Institute provides a free time sync service.
So, tell me. Give me an example. Coming below ...
Run the following in a elevated command prompt:
w32tm /config /manualpeerlist:"ntp1.sp.se,0x8 ntp2.sp.se,0x8" /syncfromflags:MANUALnet stop w32time
net start w32time
P.S. One tip is of course to check the system log afterwards to see that the time sync seems to work.
Subscribe to:
Posts (Atom)