Microsoft Teams – Welcome Message

Microsoft teams can send welcome messages when a user is added to the teams. This behavior can be altered with powershell The current setting for the team can be checked with powershell. To run this, you need to…

Read More »

Delete folders with ‘Long Filenames’

When deleting files the following error occurs: Source Path Too LongThe source file name(s) are larger than is supported by the file system. Try moving to a location which has a shorter path name, or try renaming to…

Read More »

Test GPO WMI filter using Powershell

To test a GPO WMI query, use the following command: gwmi -Query ‘WMI Query’ To check the WMI filters needed for operating systems, check this Microsoft article: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc947846(v=ws.10)?redirectedfrom=MSDN

Read More »

Backup all SQL databases

The following script can be used to backup all databases from a SQL server. The system databases are excluded. If any other database should be excluded, add them to the “NOT IN” section. For different date formats in…

Read More »

Administer WID instance with SQL Server Management Studio

Windows Server Update Services (WSUS) can use a Windows Internal Database (WID). This database is manged through WSUS, but occasionally you want to administer this with SQL Server Management Studio. Install SQL Server Management Studion (Express) on the…

Read More »

Reset 120 Day Grace Period for Windows RDS Server with PowerShell

Use the following Powershell script to reset the Grace Period of a Windows RDS Server Because the original script has been removed from the script center ( https://gallery.technet.microsoft.com/scriptcenter/Reset-Terminal-Server-RDS-44922d91), a copy can be found below:

Read More »

NetApp & Powershell – Snapshot Report

source: https://nmanzi.com/netapp-powershell-snapshot-report/ Nathan Manzi has created a powershell script for reporting snapshots on a Netapp. The script below has been altered for a cluster mode instead of a 7 mode. Also, a few parameters have been set to…

Read More »

MsSQL – Backup all SQL Server Databases

source: https://www.mssqltips.com/sqlservertip/1070/simple-script-to-backup-all-sql-server-databases/ Change @Path for the location of the backups. DECLARE @name VARCHAR(50) — database name  DECLARE @path VARCHAR(256) — path for backup files  DECLARE @fileName VARCHAR(256) — filename for backup  DECLARE @fileDate VARCHAR(20) — used for file…

Read More »

MsSQL Backup a Database

Use the following query to backup a MsSQL database. Fill in the correct database name (@name) and backup location (@path). This script uses the date for the filename, so if multiple backups are needed on the same day…

Read More »

Last Logon Date AD Users

source: https://gallery.technet.microsoft.com/scriptcenter/Get-Last-Logon-for-Users-c8e3eab2 The “lastLogon” Active Directory attribute is a property that is not replicated throughout the Domain Controllers.  This attribute is stored on the domain controller that received the authentication request and updated its property accordingly.  Because of…

Read More »