Wednesday, July 26, 2017

Inventory Using AD Module for Powershell

I wanted to go away from so many command shells for fishing information out of AD.

Quest has done well, but I'm in AD PowerShell all the time.

After many modifications, this the refined working method.

Get-ADComputer -Filter * -Property * | Select-Object -Property Name,OperatingSystem,OperatingSystemServicePack,OperatingSystemVersion,LastLogonDate | Sort-Object -Property Name | Export-CSV C:\Apps\Inventory20170726.csv

The properties can be added to, but the "Sort-Object -Property Name" with a chosen value before the "| Export-CSV C:\Apps\Inventory20170726.csv"   seemed to keep the report from becoming a single column of representative numbers.

Thursday, February 11, 2016

Adding Trusted Sites through Group Policy

The necessity for pushing out Trusted Sites arose out of our moving to Office365 for the Office Suite including Outlook and Exchange. 

Microsoft had a long list of sites for that zone. 

Step 1 was manually typing them into a clean PC.  

Step 2 was going into the Regedit.exe and finding the key for Trust Sites. 

It is found by going to: 

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains
And exporting them to a Shared folder on the Network

Step 3 is to create a Group Policy Object with a Logon Script

The script I made was the following:

IF NOT EXIST "C:\Apps" MD C:\Apps
COPY /B /S /Y "\\ServerName\GPDocuments\domains.reg" "C:\Apps\domains.reg"
REG IMPORT "C:\Apps\domains.reg"

I saved it as a .cmd and then added it to the default location that come up when you choose “Logon,” “Add a Script,” and then “Browse.”   You can just drag you “Add_trusted_sites.cmd” into the location that the browse opened.

This copies the key from the network shared folder to a folder on the PC and then imports it to the registry without any pop ups.

Saturday, October 25, 2014

Exchange 2010 on 365: Manager Access to Mailbox without attaching to Outlook

Add-MailboxPermission –Identity  -AccessRights FullAccess  -User -InheritanceType all -AutoMapping $false

Exchange 2010 on 365: Add Calendar Read ONLY Permissions

Add-MailboxFolderPermission –Identity\Calendar  -AccessRights ReadItems  -User

Thursday, October 23, 2014

Exchange 2010 on 365: Converting a Remote Mailbox to Shared

Open Active Directory Module for Windows PowerShell

Run the following commands to connect with Exchange Server

$LiveCred = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection
Import-PSSession $Session

Then run the following, substituting the user ID with that of your Remote Mailbox

Set-Mailbox -Identity "" -Type shared