[Script Of Feb. 20] How to backup SQL Server database by PowerShell

Feb. 21 Script Download: The script is available for download from https://gallery.technet.microsoft.com/How-to-backup-SQL-Server-cba8f652. This T-SQL script will demonstrate how to backup SQL Server database by PowerShell. You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery


Back to Basics: Generate Monthly Report Folders

I’m always using PowerShell to just, well, help out with day to day stuff I have to do. The other week I used PowerShell to generate a bunch of folders for 2017 that I’ll use to store my expense receipts in. All very mundane; all completed in milliseconds. $a = 1..12 | % {(Get-Date -Month $_ -f…


PowerShell Modules for Managing SharePoint Online

As a SharePoint Online administrator you have several tools available to you for automating tenant administration. When you are setting up a new  workstation it can be challenging to figure out what to install and where to get it. This post summarizes the various PowerShell tools available for managing your SharePoint Online tenant. Microsoft Online…


PowerShell Basics: Listing the number of services each user has per server

Infrastructure audits can be fun right? While they can be tedious at best, most IT Professionals are prepared via the use of Operations Management Suite or other 3rd party software that can literally produce a report in minutes (depending on infrastructure size of course!) What about if you don’t have access to these tools? Fear not…


Troubleshooting Mailbox Migration Error “You can’t use the domain because it’s not an accepted domain for your organization.”

While migrating users via MRS between organizations (especially to Exchange Online), a pretty common error that I run across is: You can’t use the domain because it’s not an accepted domain for your organization. This error is generated because the MailUser object of the user you’re attempting to migrate has a proxy address attached to…

11

[Script Of Feb. 15] How to backup SQL database to Azure Blob storage by PowerShell

Feb. 15 Script Download: The script is available for download from https://gallery.technet.microsoft.com/How-to-backup-SQL-database-855eccdb. The sample code demonstrates how to backup SQL database to Azure Blob storage by PowerShell. You can find more All-In-One Script Framework script samples at http://aka.ms/onescriptingallery

1

Using PowerShell to generate a large test CSV file with random data

I recently posted a new blog that shows how to load a very large CSV file into Excel, breaking the limit of 1 million rows in a single Excel sheet. If you haven’t seen it, you should check it out: Loading CSV/text files with more than a million rows into Excel. One of the challenges for…


Powershell – Get Domain Controllers Scheduled Task

Real quick post for the day. This script is designed to enumerate every Domain Controller in a forest and retrieve all the scheduled task.  Note this script will not work if you run it from Windows 2008 R2 or Windows 7.  You would need to change the script to use get-wmiobject instead.    $default_log =…


Removing Proxy Addresses from Exchange Recipients

I saw a request come through the other day for a method to remove unwanted proxy addresses for contacts.  I’d had some code sitting around from a project a few years back and decided to freshen it up, and maybe add some newer tricks. So, the original idea was to select a bunch of users…

4

Security Focus: Enable / Disable MFA on Azure AD Admin Account

Last week I presented a little function that I use to reset my Azure AD admin account passwords. This week I want to show how to enable / disable Multi Factor Authentication on an Azure AD account.   Enable $St = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement $St.RelyingParty = “*” $Sta = @($St) Set-MsolUser -UserPrincipalName ifarr@contoso.com -StrongAuthenticationRequirements $Sta…

1