AD and Powershell Definitions

  Active Directory

Home

Active Directory

Authenticated Users

This is a pre-defined group and includes anyone or thing that is able to authenticate against the domain.

  • User Accounts
  • Computer Accounts
  • Printer Accounts
  • etc

 

Roaming Profiles

Overview

A Roaming Profile is a user that is able to log into any number of different workstations connected to their domain and have full access to their configured enviroment as though they were sitting at their primary workstation..

  • Same desktop background and other personal configurations
  • Files and folder.

Requirements:

Saving Configurations (aka, the user’s profile)

  • Must have a shared Profile folder on the network
    • \\SERVER\path\to\profiles
  • Configure the folder as shared and ‘co-owned by everyone’ or similar
  • Configure the AD User’s Profile (User > Preferences > Profile tab)
    • Profile path:  \\SERVER\path\to\profiles\%username%

Saving / Accessing Files (aka the user’s home folder)

  • Must have a shared Home folder on the network
    • \\SERVER\path\to\home
  • Configure the folder as shared and ‘co-owned by everyone’ or similar
  • Configure the AD User’s Profile (User > Preferences > Profile tab)
    • Home folder: ( * ) Connect:
      • Select a drive letter (H:)
      • To:  \\SERVER\path\to\home\%username%

 

Powershell

` (Back quote/backtick/grave accent)

Use this character to continue writing a command on the following line

$_.

This is the current (last returned?) object.  Especially useful when looping.

Get-ADGroupMember 'Roaming Profile Users' |
   # Loop through each user
   ForEach-Object {
      # Do this for each member
      # $_ = Current Object
      Set-ADUser $_.SamAccountName -ProfilePath ("\\WINAD01\Profiles$\" + $_.SamAccountName)
   }

Input a String from Prompt

  • Prompt will be appended with “: “
$myVariable = Read-Host -Prompt "Your text goes here"

 

 

 

LEAVE A COMMENT