Here is what you do when you get the famous “(80073712)” error while trying to apply Windows Updates. Open a command prompt with Run As Administrator and run those commands one by one. You can also paste them all into a batch file, and run it with Administrator privileges; net stop wuauserv cd %systemroot%\SoftwareDistribution ren ..
category : Windows
Get the memory usage of a process, grouped, so you get the total. Example; chrome, always have one process per page, use this to get the total of memory used by all of them. $Processes = get-process chrome,iexplore | Group-Object -Property ProcessName foreach($Process in $Processes) { $Obj = New-Object psobject $Obj | Add-Member -MemberType NoteProperty ..
Thanks to Ola Hallengren, here is a simple scrip to report the fragmentation level of you database’s index One thing to note, if you don’t see any results after running this, you may have no index larger then 1000 pages, or no fragmentation at all ! Lucky you ! DECLARE @DatabaseID int SET @DatabaseID = ..
Small simple scrip to automate SQL Index maintenance. Of course, the best scripts to accomplish this is Ola Hallengren’s SQL Server Maintenance Solution, that you can find here But if you want quick and simple, here it is; DECLARE @IndexName varchar(255) DECLARE @TableName varchar(255) DECLARE @Frag float DECLARE @FragCount as int DECLARE @DbName as varchar(255) ..
Ever wanted to track some messages in Exchange ? Here is a neet trick to will help you track messages quickly. A lot more options are available, of course, this is only a small one liner to verify if a user received an email, from someone, on a particular date. Get-MessageTrackingLog -Sender “my.sender@mydomain.com” -Recipients “my.recepient@mydomain.com” ..
Powerful one liner to send an email with PowerShell. Useful in scheduled tasks to send status, or additional info. The use of environment variables is totally optional, but make a fine subject line when you want to know from which server it came from ! Suggestions on improvements are welcome, please leave a comment ! ..
Fireup your PowerShell ISE, modify to your needs, and run ! Please leave comments, suggestions below ! Import-Module ActiveDirectory # Determine the base OU $Path = ‘OU=Accounting,OU=-Department,OU=Office,DC=MyDomain,DC=net’ # Determine the new path where the groups will be created. Can be different or the same. $NewPath = ‘OU=HR,OU=-Department,OU=Office,DC=MyDomain,DC=net’ # Get all security groups to duplicate. You ..
First, fire up a PowerShell windows with the Active Directory module. If you have the Admins tools installed, it should be called “Active Directory Module for Windows PowerShell” If you don’t have the admin tools install, you must install them, or log on a server that has them, like a Domain Controler. If you do ..
Open SSMS (If you don’t know what is SSMS, you shouldn’t be doing this…) Paste and execute this query, modifying it to your needs USE master GO ALTER DATABASE TempDB MODIFY FILE (NAME = tempdev, FILENAME = ‘d:\data\tempdb.mdf’) GO ALTER DATABASE TempDB MODIFY FILE (NAME = templog, FILENAME = ‘e:\logs\templog.ldf’) GO Restart the MS SQLSERVER ..
Run from Virtual Machine Manager PowerShell Console: $IPpool = Get-SCStaticIPAddressPool “my_ip_pool” Get-SCIPAddress -StaticIPAddressPool $IPpool | ft -property Address,Description,AssignedTo..