Quick hint: How to disable IPv6 using PowerShell

How to disable IPv6 using PowerShell?   An easy way is running the following cmdlet:  New-ItemProperty hklm:\SYSTEM\CurrentControlSet\Services\TCPIP6\Parameters –Name “DisabledComponents” –Value “0xFFFFFFFF” –PropertyType “DWORD” Cheers, Anderson Patricio http://www.andersonpatricio.ca http://www.andersonpatricio.org (Portuguese) Twitter: @apatricio

Managing Windows Time

Hello my friends I got in Canada this morning at 6:00AM and around 8AM I had a time issue because the freaking atomic clock that I was using was down (Can you believe it? Well if you are using from USA, you can check the list of their status on this site http://tf.nist.gov/tf-cgi/servers.cgi). So, the topic of Today is going to be Time! (when I say that I keep hearing Morgan Freeman initial speech on Through the Wormhole series. If you haven’t seen it, please do!). There are several ways to implement time on your environment and Microsoft has great … Continue reading Managing Windows Time

Quick Hint: Cleaning up File server Public folder using Powershell

How can I clean up my File Server Public folder directory on an interval basis using PowerShell?   If your company uses a Public folder and your policy is to clean up every X days you can use PowerShell to do the work for you. Let’s create a folder on the C: root called Operations and save the command line below in a file called PF-clean.ps1. Make sure to change the path for your public folder. Remove-Item -Path F:\Public\* -Recurse Now it comes the easy part, just create new Windows Task and make sure to fill out these following fields when … Continue reading Quick Hint: Cleaning up File server Public folder using Powershell

Quick Hint: SCOM – Managing Agent Proxy using PowerShell

How can manage agent proxy in a SCOM agent using PowerShell?  PowerShell makes everything easier, right? To list all agents using names with wildcards we can use the following cmdlet where in this post all my locations share the site code on their names: Get-SCOMAgent *POA*  If the previous cmdlet brought the servers that you were expecting, then we can go ahead and enable the agent proxy for all those servers using the following cmdlet: Get-SCOMAgent *POA* |  Enable-SCOmAgentProxy If you want to disable based on the initial cmdlet, just run the following cmdlet: Get-SCOMAgent *POA* |  Disable-SCOmAgentProxy Cheers, Anderson … Continue reading Quick Hint: SCOM – Managing Agent Proxy using PowerShell

Quick hint: Basic computer actions using PowerShell in Windows Server 2012

How to manage basic computer tasks in Windows Server 2012, such as logoff, restart and shutdown from the PowerShell? I do share the same feeling, I really enjoy the new interface but when you are in a RDP session and you want to be fast, there is nothing better than open PowerShell, cmdlet and hit enter and see ya!, right? So here we have a list of common tasks where we can use Powershell and a couple of commands to get stuff done.  Restarting your computer.. Restart-Computer Logging off your session.. Logoff Shutdown your computer… Stop-Computer Before doing all that … Continue reading Quick hint: Basic computer actions using PowerShell in Windows Server 2012

Quick hint: Listing all users from a specific OU using PowerShell

I was asked Today how to create a list of all users from a specific OU with their Display Names and their logon names using PowerShell? There are several ways to get the results, a simple one when you know the location of the OU (in our example here is apatricio.local/Argentina) is to run the following cmdlet. Make sure that you are logged on a Domain Controller or at least a server with AD tools installed. Import-Module ActiveDirectory Get-ADUser -SearchBase "OU=Argentina,dc=apatricio,dc=local" -Filter * -ResultSetSize 5000 | Select Name,SamAccountName That will give you a list of the users, if you want … Continue reading Quick hint: Listing all users from a specific OU using PowerShell