Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Latest posts

PowerTip: Identify if SQL Servers are configured to best practices
Aug 21, 2019
0
0

PowerTip: Identify if SQL Servers are configured to best practices

Doctor Scripto
Doctor Scripto

Summary: Using the features of the SQLServer PowerShell module to run assessments of your servers How can I easily check that my SQL Servers are all configured to meet best practices? You can use SQL Server Assessments – the latest addition to the SQLServer PowerShell module. Just Run a best practices assessment on your SQL Server as seen below Get-SqlInstance  "DemoSQLServer" | Invoke-SqlAssessment PowerShell, Doctor Scripto, PowerTip, Johnathan Allen, SQL Server  

Executing SQL Server Assessments from PowerShell
Aug 21, 2019
0
0

Executing SQL Server Assessments from PowerShell

Doctor Scripto
Doctor Scripto

Summary: Using the SQLServer module cmdlets to review and monitor SQL Server instance and database configuration Q: Hey, Doctor Scripto! I have loads of SQL Servers in my area of responsibility and I know they all need certain configuration settings but I'm never confident that they are all set just right so I spend a long time every month visiting them all over RDP to give reassure myself. How can I automate this work? —AB A: Hello AB, I know the very person that can answer that question for you. It's my good friend Jonathan Allen. Let me introduce him to you. He's a SQL Server PFE from the UK. He...

PowerTip: Identify Synchronized AzureAD accounts without a License assigned
Aug 14, 2019
4
0

PowerTip: Identify Synchronized AzureAD accounts without a License assigned

Doctor Scripto
Doctor Scripto

Summary: Using PowerShell to identify users who are Synchronized to AzureAD but not yet licensed Hey, Doctor Scripto! I'd love to be able to identify users Synchronized to AzureAD that haven't yet had their licenses assigned.   Help a friend out? No problem at all!  You can target that information with two parameters in the Get-Msoluser Cmdlet! Get-MsolUser -UnlicensedUsersOnly -Synchronized PowerShell, Doctor Scripto, PowerTip, AzureAD  

Reporting on Microsoft 365 Licensing using PowerShell – Part 3
Aug 14, 2019
1
0

Reporting on Microsoft 365 Licensing using PowerShell – Part 3

Doctor Scripto
Doctor Scripto

Summary: Will Martin finalizes his discussion on how to report on Microsoft 365 licensing in the cloud. Previous Posts on this article can be found here for continuity Reporting on Microsoft 365 Licensing using PowerShell – Part 1 Reporting on Microsoft 365 Licensing using PowerShell – Part 2 Dr. Scripto here! When last we saw Will Martin, he was deep in a script pulling down licensing tables and produced a lovely hash table. Let’s watch for the exciting conclusion! From last week, we placed our data in a hash table. Now, let’s swap it from a hash table to CSV format by changing our last active lin...

PowerTip: Identify the last time Users changed passwords in AzureAD
Aug 7, 2019
0
0

PowerTip: Identify the last time Users changed passwords in AzureAD

Doctor Scripto
Doctor Scripto

Summary: Using PowerShell to report on Users and the last time Passwords were changed Hey, Doctor Scripto! I need to report on users and when they updated their passwords In AzureAD. Could you show me how ? Most certainly, I love to provide a helping hand however I can. Using the Get-Msoluser Cmdlet just target the LastPasswordChangeTimeStamp Attribute. Here's an example of it in use. Get-MsolUser | Select-Object DisplayName, UserPrincipalName, LastPasswordChangeTimeStamp PowerShell, Doctor Scripto, PowerTip, AzureAD  

Reporting on Microsoft 365 Licensing using PowerShell – Part 2
Aug 7, 2019
0
0

Reporting on Microsoft 365 Licensing using PowerShell – Part 2

Doctor Scripto
Doctor Scripto

Summary: Will Martin continues his discussion on how to report on Microsoft 365 licensing in the cloud. Previous Posts on this article can be found here for continuity Reporting on Microsoft 365 Licensing using PowerShell – Part 1 Remember from last week we showed the results of what a user licensed in Microsoft 365 looked like in the web portal? So, what does this look like if we try to access it in PowerShell? Well, we have the user, and the service plan. Can we get this into a usable format? Well, let’s see what we can do – let’s try pulling this info for our last three users and see what we...

PowerTip: Identify the last time a User was Synchronized to AzureAD
Jul 31, 2019
0
0

PowerTip: Identify the last time a User was Synchronized to AzureAD

Doctor Scripto
Doctor Scripto

Summary: Use PowerShell to identify the property in AzureAD with the Synchronization time in AzureAD Hey, Doctor Scripto. Is there a way with PowerShell to identify when a user was last synchronized with AzureAD? Absolutely! We just need to examine the LastDirSyncTime when using the Get-Msoluser cmdlet. Here’s an example below (Get-MsolUser -UserPrincipalName 'drscripto@contoso.com').LastDirSyncTime PowerShell, Doctor Scripto, PowerTip, Microsoft 365    

Reporting on Microsoft 365 Licensing using PowerShell – Part 1
Jul 31, 2019
0
0

Reporting on Microsoft 365 Licensing using PowerShell – Part 1

Doctor Scripto
Doctor Scripto

Summary: Will Martin discusses how to report on Microsoft 365 licensing in the cloud. Hello everyone, Doctor Scripto here today to introduce you to a good friend of mine. Will Martin is a PFE in Messaging here at Microsoft and he wanted to share a wonderful solution he found on reporting on Microsoft 365 licensing with PowerShell. Will my friend, the Blog is now in your most capable hands! Thanks for the introduction Doctor Scripto! I came across an interesting problem recently. I was asked by my large Office 365 customer if I could give them a script that would output all their user account licensing...

PowerTip: Show files with expired Digital Certificates
Jul 24, 2019
0
0

PowerTip: Show files with expired Digital Certificates

Doctor Scripto
Doctor Scripto

Summary: Targeting Expired Certificates with Get-AuthenticodeSignature Question: Hey Doctor Scripto! Is there an easy way to visually identify Digitally signed files with an Expired status on the Digital Certificate? Answer: Absolutely! We just need to filter on the “Status” property and show those without the value ‘Valid’. As an added bonus it would also identify files that are not digitally signed. Get-Childitem C:\Folder\*.* -Recurse | Get-AuthenticodeSignature | Where-Object { $_.Status -ne 'Valid' } PowerShell, Doctor Scripto, PowerTip