Paul DeArment Jr replied to the topic How to pull Primary SMPT from secondary SMTP in the forum General PowerShell Q&A 1 week, 6 days ago
There is a lot going on there – but I checked and I have something from earlier this year I wrote for work with our office 365 migration – and here is a modified version below.
for efficiency you only want to get the users which are in your file – i used csv – but you can change the import-csv to get-content (and then change the get-aduser…[Read more]
Paul DeArment Jr replied to the topic Script to install whole environment (is it possible) in the forum General PowerShell Q&A 4 weeks, 1 day ago
DSC is a big topic. There are many ways to do things – basically, you need to define how you want your environment to work first and then pick the DSC settings which will make it work the way you want.
Shall I configure LCM to Apply only when configuring DC in production?
Do you want your server to only take the initial config or do you want it…[Read more]
Paul DeArment Jr replied to the topic Rename File from CSV List in the forum General PowerShell Q&A 1 month, 1 week ago
You don’t need to use a script block there for the new name parameter – just need to create the string that you want to work with. As per your original code above with a space between currentClientName and $_.name:
Rename-Item -Path $PathRoot -NewName “$($CurrentClientName) $($_.name)”
Paul DeArment Jr replied to the topic Copy AD Group membership from series of groups to new groups in the forum General PowerShell Q&A 1 month, 2 weeks ago
Looking at the code provided – I don’t see where $var is used (unless there was more code that wasn’t included?)
That being said – do something like the following in a foreach loop
foreach ($item in Import-Csv c:tempgroupsourcefile.csv)
$gname = $item.name
#Remove the prefix from the name, leaving only the variable
$gvar = ($gname -split…[Read more]
Paul DeArment Jr joined the group Shell Business 2 months, 1 week ago
Paul DeArment Jr joined the group Summiteers 2 months, 1 week ago
Paul DeArment Jr joined the group Patterns & Practices 2 months, 1 week ago
Paul DeArment Jr joined the group Teaching PowerShell 2 months, 1 week ago