Archive for the 'Windows Server' Category

Bulk Rename File History UTC with Powershell

I had a Windows Backup created with FileHistory but was not able to restore anymore because the DB seamed corrupted. Anyway the files were still there but they had the UTC Timestamp added. So here a script to remove the timestamps:

Before: Test (2017_08_03 13_49_28 UTC).jpg
New: Test.jpg

$regex=" \(\d{4}_\d{2}_\d{2} \d{2}_\d{2}_\d{2} UTC\)"

Get-ChildItem *UTC* -Recurse | Where-Object {$_.Name -match $regex} | Rename-Item -NewName {$_.Name -replace $regex} -Verbose

Warning: As always, use it on your own risk. If you should have the same file with multiple timestamps then you need to extend the script a bit. This one just works with unique files with timestamp.

No Comments »

admin on March 28th 2018 in IT, PowerShell, Windows, Windows Server

WSUS Console Error

I have installed a bunch of updates on the WSUS Server and after that I coudln’t login to the console anymore.

So I did some research on the net and some users had to uninstal KB3148812 and others KB3159706.

Instead of uninstalling following steps helped me:

  1. Elevated Command Prompt "C:\Program Files\Update Services\Tools\wsusutil.exe" postinstall /servicing
  2. Enable HTTP Activation under .NET Framework 4.5 Features in the Server Manager Add Roles and Features Wizard
  3. Restart the WSUS service

No Comments »

admin on October 19th 2016 in IT, Windows Server

WSUS shows Vista instead of Windows 7

Microsoft released a hotfix for that:
https://support.microsoft.com/en-us/kb/3095113

No Comments »

admin on April 19th 2016 in Windows Server

Shortcut to login with local Administrator on Windows

.\Administrator

No Comments »

admin on December 22nd 2015 in IT, Windows, Windows Server

Upgrade from Windows 2012 Standard to Enterprise Edition

DISM /Online /Set-Edition:ServerDatacenter /AcceptEula /ProductKey: *****-*****-*****-*****-*****

No Comments »

admin on December 11th 2015 in IT, Windows Server

Deploy ODBC Setting with Windows Authentication via GPO

You can actually deploy ODBC Settings via GPO very easily.

Computer Configuration > Preferences > Control Panel Settings > Data Sources
or
User Configuration > Preferences > Control Panel Settings > Data Sources

ODBC Example with Windows Authentication
New > Data Source
Action: Replace
Data Source Name: Test
Driver: SQL Server

Attributes:
Database: DBName
Server: SQLServer
TRUSTED_CONNECTION: Yes

No Comments »

admin on September 26th 2015 in IT, Windows, Windows Server

Compact a vhdx disk

After you delete files from vhdx disk I noticed that it doesn’t free up disk space on a dynamic vhdx file.

Make sure the vhdx file is mounted read-only or not at all and run following command to free up disk space:
Optimize-VHD –Path C:\Data\Test.vhdx –Mode Full

Important: I could just run this command from a computer where Hypver-V role was installed.

No Comments »

admin on May 19th 2015 in IT, Windows Server

Install the IPAM Server on Windows 2012 R2

If you have multiple DNS, DHCP, NPS Servers you can install an IPAM-Server to manage them. It also gives you a good overview and statistics.

Important: The IPAM feature can’t be installed on a DC and the computer needs to be joined to the domain. It should also not be on a DHCP/DNS Server.

Quick step by step guide to install it:
1. Install the IPAM-Feature
You will be asked to choose between an WID DB or an MS SQL Server and to pick a GPO name prefix to provisione the servers with a GPO. I picked the WID DB and as GPO name prefix IPAM.

2. Configure IPAM
Connect to IPAM Server
Provision the IPAM Server
Configure Server Discovery (Pick the Domains)
Start Server Discovery

3. After that you will notice that the servers will be populated but showed as blocked. To manage them install the GPOs on the DCs and add the IPAM Server to the Builtin\Event Log Readers Group.

Run following command to install the GPO’s in the powershell as an administrator:
Invoke-IpamGpoProvisioning -Domain contoso.com -GpoPrefixName IPAM -IpamServerFqdn ipam.contoso.com –DomainController dc1.contoso.com

Now you should see in the Group Policy Manager three new GPOs:
ipam_DC_NPS
ipam_DHCP
ipam_DNS

Make sure that in the Security Filtering all the servers which should be managed are added.
Then run a “gpupdate /force” on all the servers.

Then add the IPAM-Server to the Builtin\Event Log Readers Group

4. Even I did everything above it still didn’t show up as unblocked in the IPAM Server Inventory. The trick was to edit the servers manually and untick and tick again the DNS-Server. After that it worked like a charm;-)

No Comments »

admin on April 20th 2015 in IT, Windows Server

Can’t add the Event Viewer from a Remote Machine to a Management Console (MMC)

If you run the MMC Console as an Domain Admin and you can’t add the event viewer of an remote machine to the mmc console it is probably because of the firewall settings.

Go to the remote machine and run firewall.cpl:
Allow an app or feature through Windows Firewall->Check Remote Event Log Management.

That’s it. Enjoy;-)

No Comments »

admin on March 31st 2015 in IT, Windows Server

Troubleshooting Active Directory Replication

In Windows 2003 there was a useful gui tool replmon but they didn’t continue developing and shipping it.

But you can also do it comfortable with the command repadmin. Here the most important commands:
repadmin /showrepl
repadmin /showrepl * /errorsonly
repadmin /showrepl * /csv
repadmin /queue
repadmin /queue DCServerName
repadmin /replsummary

repadmin /syncall DCServerName /APed
* All Partitions Push enterprise distinguished Name
** Pushes all DCs to start the replication

No Comments »

admin on March 3rd 2015 in IT, Windows Server




Check out new movies online website. Download and buy movies now.