• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

danblee.com

Tutorials & Knowledge Base Articles for System Administrators who wear many, many hats.

  • Home
  • About
  • Ask Me
  • DBLHost.com
You are here: Home / Archives for Microsoft Windows

Microsoft Windows

The “do something to all machines” PowerShell Script

January 6, 2021 by Dan B. Lee Leave a Comment

On a domain? You can do something to all machines on a domain with this quick little script here. Your best bet is to open up an elevated (admin) Powershell Prompt on a domain controller and then run that here: Get-ADComputer –filter * | foreach { < do the thing > } Here are some examples that have really helped me in my administrative journeys: Force GPUpdate for all machines on the domain: Get-ADComputer –filter * | foreach { Invoke-GPUpdate –computer $_.name -force } Force … [Read more...] about The “do something to all machines” PowerShell Script

Filed Under: Active Directory, Group Policy, PowerShell Tagged With: Active Directory, Domains, PowerShell, Scripting

Powershell script won’t run portion requiring Excel in Scheduled Task

September 26, 2019 by Dan B. Lee Leave a Comment

Some of the scripting I've recently done requires Excel to be launched (non interactively) on a domain controller to gather usernames and whatnot. For some reason, the entire script would work perfectly besides the portion that requires Excel. I could run the script as an admin in ISE and it would work, but not via the Task Scheduler. Here's the fix: Create these two folders on your server: C:\Windows\System32\config\systemprofile\Desktop … [Read more...] about Powershell script won’t run portion requiring Excel in Scheduled Task

Filed Under: Microsoft Excel, Microsoft Office, PowerShell Tagged With: Excel, PowerShell, Scripting, Task Scheduler

Exchange: Export a list of all public facing distribution groups

February 6, 2019 by Dan B. Lee Leave a Comment

Public facing isn't the right term here. It simply means that the authentication requirement to send mail to the distro has been disabled to give anyone anywhere the ability to send an email to it. That makes it publicly accessible. If you want a list of all of the distribution groups that have the authentication requirement disabled you can use this little one-liner. Open Exchange Management Shell as an Administrator and type the following: Get-DistributionGroup | ? … [Read more...] about Exchange: Export a list of all public facing distribution groups

Filed Under: Exchange 2003, Exchange 2010, Exchange 2013, Microsoft Windows, PowerShell Tagged With: Exchange, Exports, Microsoft Exchange Server, PowerShell, Scripting, scripts

Migrating VEEAM Backup Data

June 5, 2018 by Dan B. Lee Leave a Comment

If you want to move backups from one location to another, you're going to need to make sure you have some things configured properly. Here are a few things I learned while migrating to a larger storage area for my data. It's definitely easier, arguably faster, to migrate data using ROBOCOPY. Even though you'll have more thread available to migrate data using ROBOCOPY, you're only as fast as your storage and your processing power. A big copy and paste of your data using windows won't be much … [Read more...] about Migrating VEEAM Backup Data

Filed Under: Microsoft Windows, Storage, VEEAM, Virtualization Tagged With: backup software, Backups, data, Data migrations, ROBOCOPY, Storage, VEEAM

Using ROBOCOPY switches for faster, more reliable data moves

June 5, 2018 by Dan B. Lee 1 Comment

For a lot of big data moves that don't require special software but need to be logged, you can us ROBOCOPY, a built in file moving command that will not only let you log the moves but also enabling a multi-threaded structure for faster moves. Use this command with the following switches for the fastest possible Robocopy without interruption: robocopy C:\Folder1 C:\Folder2 /TEE /LOG:"C:\Test\log.txt" /E /FP /R:5 /W:1 /MT:128 robocopy C:\Folder1 C:\Folder2 is the base of your script. This … [Read more...] about Using ROBOCOPY switches for faster, more reliable data moves

Filed Under: Microsoft Windows, Storage Tagged With: data, data migration, migrating, migrations, moving files, ROBOCOPY

PowerShell script to remove all Active Directory computers in a list

May 16, 2017 by Dan B. Lee Leave a Comment

Scenario You made an awesome list of old computers and now you want to delete these computers using PowerShell for the sake of cleaning up AD. The Script Here you go: Import-Module ActiveDirectory Get-Content C:\scripts\to-delete.txt | % { Get-ADComputer -Filter { Name -eq $_ } } | Remove-ADObject -Recursive -WhatIf Explanation Separate each action by the pipe, that's the little thing that looks like | Get-Content is where you'll grab the information in the text file. Mine was … [Read more...] about PowerShell script to remove all Active Directory computers in a list

Filed Under: Active Directory, Microsoft Windows, PowerShell Tagged With: AD, Cleanup, PowerShell, WhatIf

Anti Spoofing for Domains in Exchange 2016

May 15, 2017 by Dan B. Lee 3 Comments

If your'e getting mail from outside sources pretending to be on your domain, you can create a Mail Flow Rule to manage messages that say they are from your domain but really aren't. Log into the ECP and go to Mail Flow > Rules and New (+) Click "more options..." You want to add two applications. Apply this rule if: The sender domain is 'yourdomain.com' The sender location is from outside of the company You can treat mail that triggers those two applications any way … [Read more...] about Anti Spoofing for Domains in Exchange 2016

Filed Under: Exchange 2013, Microsoft Windows, PowerShell, Windows Server Tagged With: Domain Spoofing, Email, Exchange, Phishing, PowerShell, script, Spoof, Testing

Use PowerShell to list your folders on a server or share

May 3, 2017 by Dan B. Lee Leave a Comment

Here's a quick script to list all of the folders on a share or on a server. This script will use PowerShell to export a list of folders to a CSV file. We'll be using the Get-ChildItem cmdlet to accomplish this. Get-ChildItem \\FS01\Shared -Recurse -Name -Directory | Out-File "C:\misc\Folders.csv" Let's break this down: Get-ChildItem is the cmdlet. It is just like "dir" or "ls" where it's main job is to tell you the contents of a folder. You can learn more about Get-ChildItem … [Read more...] about Use PowerShell to list your folders on a server or share

Filed Under: Microsoft Windows, PowerShell Tagged With: CMD, PowerShell, Scripting, scripts

Log on as Batch Job Rights for Task Scheduler

April 11, 2017 by Dan B. Lee 4 Comments

Scenario: You just created a scheduled task that needs to be run even when nobody is logged on. You have a service account to mange the job and it will run with the highest privileges. Unfortunately, you run the task and nothing happens when the task is triggered. Solution: This could be the result of many things, but there's a good chance the service account you chose doesn't have "Log on as Batch Job" rights in the local security policy of the server. Here's how to enable that: Go to … [Read more...] about Log on as Batch Job Rights for Task Scheduler

Filed Under: PowerShell, Windows Server 2008 R2, Windows Server 2012 Tagged With: Batch Jobs, PowerShell, Scripting, Task Scheduler

Get-ADUser Extended and Default Properties

March 28, 2017 by Dan B. Lee Leave a Comment

Here's a big list of all of the properties that you could apply to the Get-ADUser cmdlet in Powershell: Property Syntax R/RW lDAPDisplayName AccountExpirationDate DateTime RW accountExpires, converted to local time AccountLockoutTime DateTime RW lockoutTime, converted to local time AccountNotDelegated Boolean RW userAccountControl (bit mask 1048576) AllowReversiblePasswordEncryption Boolean RW userAccountControl (bit mask … [Read more...] about Get-ADUser Extended and Default Properties

Filed Under: Microsoft Windows, PowerShell Tagged With: attributes, CMDlet, get-aduser, properties, Pwershell

Next Page »

Primary Sidebar

Categories

  • Active Directory
    • Group Policy
  • Adobe Photoshop
  • Browsers
    • Chrome
  • Cloud Based Technology
    • Citrix XenApp
  • ConnectWise
    • LabTech
  • Dell
  • Internet Service Providers (ISPs)
  • iPhone
  • Linux
    • CentOS
    • OpenVPN
    • SaltStack
    • Ubuntu
  • Microsoft Office
    • Lync
    • Microsoft Excel
    • Microsoft Outlook
    • Microsoft Word
  • Microsoft Windows
    • Active Directory
    • PowerShell
    • Windows 7
    • Windows 8 Preview & Release
  • Networks
  • News
  • Off Topic
  • Office 365
  • Peripherals
    • Monitors
  • Printers
    • Local Printers
    • Network Printers
  • Programming
    • Python
  • Riverbed
  • Security
  • Sharepoint
  • Social Media
  • Splunk
  • Storage
  • Switching & Routing
    • Cisco
    • Fortinet
  • Technology Culture
    • Opinion
  • Uncategorized
  • Virtualization
    • VEEAM
    • VMware
  • WAMP
  • Web Hosting
    • WHMCS
  • Website Design
  • Windows Server
    • Exchange 2003
    • Exchange 2010
    • Exchange 2013
    • Microsoft SQL
    • Windows Server 2003
    • Windows Server 2008 R2
    • Windows Server 2012
  • WordPress

Footer

Recent Activity

  • pings on Xerox Phaser 3635MFP Default Admin Username and Password
  • Xerox Phaser 3635MFP Default Admin Username and Password — danblee.com on About Dan B. Lee
  • Estudio Login | LOGINEGG on Toshiba E-Studio Default Administrator Username and Password
  • Estudio Login | LOGINSPENT on Toshiba E-Studio Default Administrator Username and Password
  • Estudio Login | CHARTLOGIN on Toshiba E-Studio Default Administrator Username and Password

Dan Lee

Dan B. Lee works at SyApps, LLC., a Managed Hosting Solutions Firm, as a Senior Network Engineer. Dan has a decade of IT experience and specializes in a number of different disciplines including Virtualization, Web Site Hosting and Design, Network Security, Data Center Architecture, Local and Remote Server Hosting, and Backup & DRS Solutions. Read More…

Links

  • Home
  • About Dan B. Lee
  • Ask Me
  • Privacy Policy

Copyright © 2021 · Genesis Child Theme on Genesis Framework · WordPress · Log in