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.
admin on March 28th 2018 in IT, PowerShell, Windows, Windows Server
1. Download and Install “Microsoft Virtual Machine Converter”
2. Open Powershell with Elevated Privileges
3. Import Module / Convert VMDK
Import-Module “C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1”
convertTo-MvmcVhd -SourceLiteralPath c:\source\scource.vmdk -DestinationLiteralPath c:\destination\ -VhdType FixedHardDisk -VhdFormat vhdx
admin on January 1st 2018 in Hyper-V, IT, PowerShell, VMWare
To get the powershell version run:
$psversiontable
To run another version of powershell run for example:
powershell -version 2.0
admin on July 24th 2013 in IT, PowerShell
If you run the command without the management tools then you won’t have the tabs to configure the snmp-service. By the way the argument –Whatif shows you in advance what would be installed if you run the command. So to actually installe it run the command without –WhatIf.
#Add-WindowsFeature -Name SNMP-Service -IncludeAllSubFeature -IncludeManagementTools –Restart –WhatIf
admin on June 4th 2013 in IT, PowerShell, Windows Server
Show-Command opens a new dialog where you can browse comfortably trough all commands.

admin on March 1st 2013 in IT, PowerShell, Windows Server
You can use the Get-EventLog. Example:
Get-EventLog -LogName Application -Source "*Update*" | Format-List
Get-EventLog -LogName Application –Newest 10
admin on February 11th 2013 in IT, PowerShell
Like ssh you can run a remote session in powershell.
Test if remote session is enabled
#Test-WsMan [Computername]
If you get a result, it should be up and running. Otherwise you need to activate it on the remote server like this.
Enable PowerShell Remoting on a Server
1. Run Powershell as an administrator
2. #Enable-PSRemoting –Force
This command starts the WinRM server service and sets it automatically to start with the system. It also creates a firewall rule that allows incoming connections.
Workgroup
If your computers aren’t in a domain you need to do a couple of more steps to make a trust between them. You need to edit the TrustedHosts on both sides. You could put the IP Adresses comma-seperated instead of * to further restrict it. With the * it will allow any host.
1. #Set-Item wsman:\localhost\client\trustedhosts *
2. #Restart-Service WinRM
Execute a Remote Command
#Invoke-Command -ComputerName COMPUTER -ScriptBlock { COMMAND } -credential USERNAME
Start a Remote Session
#Enter-PSSession -ComputerName COMPUTER -Credential USERNAME
admin on February 8th 2013 in PowerShell
Get-ChildItem -r *lana*.mp3 | Copy-Item -destination D:\Lana
admin on February 1st 2013 in PowerShell
Short example:
dir –R –I *.exe
Long one:
Get-ChildItem -recurse –include *.exe
Search inclusive text:Get-ChildItem -recurse *.exe | Select-String searchtext
admin on November 27th 2012 in IT, PowerShell
Today i tried to install VMWare vSphere PowerCLI and got the vbscript error message.
Follow this steps to solve the problem:
1. Create a backup
2. Delete following registry entries:
Win32 Bit
HKCU\SOFTWARE\Classes\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}
HKCU\SOFTWARE\Classes\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}
Win64 Bit
HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{B54F3741-5B07-11CF-A4B0-00AA004A55E8}
HKCU\SOFTWARE\Classes\Wow6432Node\CLSID\{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}
3. Run CMD as an Administrator
4. regsvr32 vbscript.dll
5. regsvr32 jscript.dll
admin on June 4th 2012 in IT, PowerShell, Windows