If you've changed your Operating System hostname, you should reflect that change in SQL Server by updating the name in the Master database. SQL Server doesn't support updating the name when involved in database mirroring, replication, or clustered environments. You'll have to remove the feature, update the name, then re-add the feature. … [Read more...]
MSSQL Check Index Fragmentation
Query to find the fragmentation status of all indexes on a single database. Line 11 you need to insert your db name. … [Read more...]
Get Dell ServiceTag with WMI
wmic bios get serialnumber … [Read more...]
Export Active Active Directory Users into CSV
That's not a typo. Export only active Active Directory users (not disabled) into a csv file with csvde, the following should suite your needs: # Collect Internal users for your audit purposes csvde -d "OU=Users,OU=Internal,DC=DomainName,DC=Suffix" -r "(&(objectCategory=person)(!UserAccountControl=66050)(!UserAccountControl=514))" -l SAMAccountName,name,description,UserAccountControl,logonHours -f "InternalUsers.csv" You can easily put this into task scheduler for automated reporting at … [Read more...]
Get the SID of an Active Directory User
Can't remember why I needed to, but if you need to get the SID of an Active Directory user account you can run either of these powershell scripts: $name = “username” (New-Object System.Security.Principal.NTAccount($name)).Translate([System.Security.Principal.SecurityIdentifier]).value or $objUser = New-Object System.Security.Principal.NTAccount("fabrikam", "kenmyer") $strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) $strSID.Value … [Read more...]
List IIS Application Pool PID
Determine which application pool's worker process (w3wp.exe) is hogging your CPU resources. The command below can be run in a command prompt to list IIS Application Pool PID's. To view process ID's in task manager navigate to View | Select Columns | PID. I've needed to do this several times when a single worker process was consuming too much cpu resources and needed to be killed. Stopping the application pool did not help. %windir%/system32/inetsrv/appcmd list wp … [Read more...]
- « Previous Page
- 1
- …
- 7
- 8
- 9
- 10
- Next Page »