Tag: powershell

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 »

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 »

Quickly list all mailboxes to which a particular user has access

From Vasil Michev source: http://www.michev.info/Blog/Post/77/Quickly-list-all-mailboxes-to-which-a-particular-user-has-access   List all mailboxes to which a particular user has Full Access permissions: PS C:\> Get-Mailbox | Get-MailboxPermission -User vasil Identity             User                 AccessRights ——–             —-                 ———— HuKu                 Vasil Michev         {FullAccess} retail               Vasil Michev        …

Read More »

Find Mailbox and Online Archive size

Script to connect to Office 365 and collect the last logged on date/time, mailbox size and item count for each mailbox and archive mailbox for every user within your organization. The following script was specifically written for a…

Read More »

Customizing the RDS title “Work Resources” using PowerShell on Windows Server 2012

See http://social.technet.microsoft.com/wiki/contents/articles/13451.customizing-the-rds-title-work-resources-using-powershell-on-windows-server-2012.aspx   If you are running multiple Connection Brokers in High Availability mode, you must run this against the active broker. You can use this command: Set-RDWorkspace -Name “XYZ Applications” -ConnectionBroker (Get-RDConnectionBrokerHighAvailability).ActiveManagementServer   Otherwise you can use: set-RDWorkspace…

Read More »

VMware get inventory

source: http://www.wooditwork.com/2010/08/16/exporting-all-that-useful-vm-information-with-powercli/ To export a list of usefull information about your environment use the following oneliner to export it to a CSV.

   

Read More »

Copy WSUS approvals between Groups

source: http://www.craig-tolley.co.uk/2016/01/21/wsus-copy-updates-between-groups/ Run the script below, then call it using the following syntax:

You can optionally specify a port, the default being 8530. You can also specify to use a secure connection. The group names are both case…

Read More »