Home » Script

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 »

Get Office 365 users with a specific license type via Powershell

It can sometimes be useful to get a list of Office 365 users with a specific license type via PowerShell. Instead of logging into the Office 365 portal and using a filtered view in the admin center, you…

Read More »

Terminal Server Inactive Printer Ports

During the restart of a Terminal Server, inactive TS ports should be deleted. When these inactive ports are not deleted, over time, a server can become sluggish or even hang because of this. When there are a lot…

Read More »

Create a Dynamics NAV NST Instance with Powershell

How to create a NST instance with a powershell script:  

 

Read More »

Sending test email with powershell

Use the following command to send a test email with powershell:   Send-MailMessage –From sender@domain.com –To recipient@domain.com –Subject “Test Email” –Body “This is a test email” -SmtpServer smtpserver.fqdndomain.local

Read More »

Synching Microsoft NPS (RADIUS) servers

source: http://www.routereflector.com/2016/07/syncing-microsoft-nps-servers/ Use the following powershell script to sync microsoft NPS (radius) servers.

 

Read More »