Jump to content

halbaradkenafin

Members
  • Posts

    1,219
  • Joined

  • Last visited

Everything posted by halbaradkenafin

  1. Decided to just resub my alt account and start training my freighter alt for indy. Should be in a barge in a few days and then work on other indy skills over the next few months, might work towards the Orca again as that's pretty useful for hauling stuff around.
  2. And things just work, no messing around with the RM way of dealing with problems.
  3. Turns out I've got more SP than I thought (according to Aura I have 89mil) and I think my skills have been training beyond the old 3 days of "ghost training" that used to exist. I decided to Hours for Plex early since I'm subbing normally later anyway to get a few extra hours of skill training (won't make much of a dint on my ~460 day skill queue). Edit: Turns out Aura hadn't updated things properly and my skill queue is longer than expected.
  4. Well I guess I might just sub normally and buy a GTC to pad the wallet a bit, need to check current funds once I'm on again.
  5. I'll download the client tonight and hours for plex the account, pretty sure I've got enough isk for a plex as long as they haven't risen too close to 1bil.
  6. I'll think about it. Need to read up on any changes since I last played. I'd have to join with my main though, don't really want to waste the 80mil or so SP I've got, I think the alt on that account has research skills and a bit of hauling though.
  7. You guys need to stop posting about things as it keeps tempting me to come back.
  8. We've got it set up similar to you, the way we've solved this problem is to tell staff to create folders for individual pupils in the area they want (naming them the same as the kids username) and then running a simple script to assign Modify permissions to that folder for the named user. Luckily for us we've only got a few teachers who want to do this so it's not too bad. Giving everyone Modify to a pupils work will probably lead to a few playing silly buggers and deleting each others work (or bits of it) and copy/pasting work to their own stuff, might be less of a problem at Primary than Secondary but still possible.
  9. Is there more code for this script? This just appears to be setting the basic variables and not actually adding the users to groups.
  10. If it's Office and Windows licenses then MagicalJellyBean (or whatever the software is called) can find the licenses on a machine. I'm not sure this interacts with KMS though.
  11. I was asked recently by someone to be able to find all the groups someone is a member of in O365. It's a pretty easy process through the web interface but involves a lot of clicking so I figured I'd script it and add in a little extra functionality for the inevitable time someone says "Can you tell us which groups these 3/4/5/6 people are members of?". It requires the AD and MSOnline Modules but that's all: <# .Synopsis Gets all the O365 groups that a specific user is a member of from those available. .DESCRIPTION Gets all the O365 groups that a specific user is a member of based on user inpupt. This information can then be piped out to CSV or other formats. Will also accept a list of names and find groups that each is a member of but with the option to also get groups that all users are a member of. The script first connects to the O365 environment and then retrieving a list of groups that exist within the environment. It will then loop through each specified user and find each group that they are a member of and compile that to a list, once all the users have been searched it will return the list to the pipeline to be passed to either an export or format cmdlet. .EXAMPLE Get-MsolGroupMembership -User "J.Bloggs" This will find each group that J.Bloggs is a member of. .EXAMPLE Get-MsolGroupMembership -User "J.Bloggs","J.Smith","P.Davies" This will get a list of groups that each named users is a member of, grouped by user. .EXAMPLE Get-MsolGroupMembership -User "J.Bloggs","J.Smith","P.Davies" -Shared This will get a list of groups that each named user is a member of, grouped by user, but also a seperate section of groups that all of the users are members of together. .EXAMPLE Get-MsolGroupMembership -User "J.Bloggs","J.Smith","P.Davies" -SharedOnly This will get a list of groups that contain all the named users but not groups that they don't share with each other member. .EXAMPLE Get-MsolGroupMembership -User "J.Bloggs","J.Smith","P.Davies" -NotShared This will get a list of groups that contain all named users but that don't contain any of the other users. #> [CmdletBinding()] Param ( #Users to find membership for. [Parameter(Mandatory=$true, Position=0)] [string[]]$User, #Also list groups shared by all users [switch] $Shared, #Only list groups shared by all users [switch] $SharedOnly, #Don't list groups shared by all users [switch] $NotShared ) #Ensure the provided usernames are valid for the enviroment foreach ($IndivUser in $User) { if ($IndivUser -match "@") { $ADUser = Get-ADUser -Identity ($IndivUser.split("@"))[0] } else { $ADUser = Get-ADuser -Identity $IndivUser } If (!$ADUser) { Write-Error "Username $IndivUser doesn't exist. Please check the entered value and try again." Exit } } #Connect to O365 $LiveCred = Get-Credential Connect-MsolService -Credential $LiveCred #Get the list of groups $AllGroups = Get-MsolGroup -All $Domain = Get-MsolDomain | Where {$_.Authentication -eq "Federated"} | Select -ExpandProperty Name #function to get all the groups that a user is a member of and return them function Get-UsersGroups { $UserGroups = @() Foreach ($Group in $AllGroups) { If ((Get-MsolGroupMember -GroupObjectId $Group.ObjectId -all).EmailAddress -contains $args[0]) { $UserGroups += $group.DisplayName } } Return $UserGroups } $CombinedMembership = @() #Loop through each named user and find their groups foreach ($IndivUser in $User) { if ($IndivUser -match "@") { [system.Collections.Arraylist]$UserGroups = Get-UsersGroups $IndivUser } else { [system.Collections.Arraylist]$UserGroups = Get-UsersGroups "$IndivUser@$domain" } $CombinedMembership += New-Object -TypeName PsObject -Property @{'Username' = $IndivUser;'Groups'=$UserGroups} } #if statements for what to output if ($Shared -or $SharedOnly -or $NotShared) { #Find the shared groups [system.Collections.Arraylist]$sharedGroups = $CombinedMembership.Groups | Select -Unique Foreach ($PossibleGroup in $SharedGroups) { $PossibleGroup = $PossibleGroup.Replace(")","\)") $PossibleGroup = $PossibleGroup.Replace("(","\(") if (([regex]::Matches($CombinedMembership.Groups,$PossibleGroup)).Count -ne $CombinedMembership.Count) { $sharedGroups.Remove($PossibleGroup) } } #Create the output objects needed for the shared groups if ($Shared) { $CombinedMembership += New-Object -TypeName Psobject -property @{'Username'='Shared';'Groups'=$SharedGroups} } elseif ($SharedOnly) { $CombinedMembership = New-Object -TypeName Psobject -property @{'Username'='Shared';'Groups'=$SharedGroups} } elseif ($NotShared) { Foreach ($GroupToRemove in $SharedGroups) { foreach ($IndivUser in $CombinedMembership) { if ($IndivUser.Groups -contains $GroupToRemove) { $CombinedMembership[$CombinedMembership.IndexOf($IndivUser)].Groups.Remove($GroupToRemove) } } } } } Write-Output $CombinedMembership It doesn't accept input from the pipeline but the output can be piped to any of the export-* and format-* cmdlets.
  12. Have you got the latest firmware for the board? I've seen this before and that usually fixes it. Failing that try the other usual thing of replacing the connecting cable (if possible anyway).
  13. Unless it's being shared between a few of us I stay away from Dominoes and Pizza Hut because those prices are far too high for the quality of pizza you get. I just pop along to Asda and get a create your own pizza (usually with a better selection of toppings) for about £3, with travel and cooking time it works out about the same either way and I can spend the money I saved on beer or food for another few days.
  14. This does work but if you accidentally add a space in after the "`" then it will fail as the "`" is an escape character. @Arthur's solution of using a hashtable is more reliable (and in my opinion more readable).
  15. The shortened thread title had me slightly worried about where this thread would go as it said "I thought I'd killed them..." but I wasn't expecting it to be this.
  16. I'm playing it off and on, alongside World of Tanks and Hearthstone. My Port currently has: South Carolina, Clemson, Isukaze (sp?) and Myogi in it, I've unlocked the Phoenix but not bought it yet as I'm not sure if I want to continue down the cruiser line. The South Carolina and Myogi will both be replaced once I unlock the Carriers but that's going to be a while.
  17. Not directly, you need a 2008 server in between. So you'd make your first DC 2008R2 and migrate to that, then set up a 2012R2 on the same domain and let it all replicate across, then transfer roles etc and demote the 2008 server (assuming you don't want to use it for anything else then remove it).
  18. It's pretty straight forward actually, you need to ensure you're using the migration tool from Microsoft to keep the same GUIDs (as that's one of the things it looks at). Then it's just a case of removing the federation from one domain and adding it again on the other. Unify support should be able to help you out if you need it, they are actually pretty helpful for this as we asked them about it last year.
  19. GPO would be the easiest way if the contents are always going to be in the same source location. Not many ways to do it to multiple PCs simultaneously, possibly Powershell Jobs but I haven't done much with them so couldn't tell you how easy/hard it would be.
  20. That's the best way to learn, just make sure you've got a few replacements and set your clone to the same station.
  21. Setting a parameter like this should do it. That way you can either call the script and add the -path to the end of it or call it and it will ask for the path. [color=#333333]param($FolderPath = $(Read-Host "Enter path"))[/color] [color=#333333]Get-childitem $FolderPath -recurse | where{$_.psiscontainer} |[/color] [color=#333333]Get-Acl | % {[/color] [color=#333333]$path = $_.Path[/color] [color=#333333]$_.Access | % {[/color] [color=#333333]New-Object PSObject -Property @{[/color] [color=#333333]Folder = $path.Replace("Microsoft.PowerShell.Core\FileSyste m::","")[/color] [color=#333333]Access = $_.FileSystemRights[/color] [color=#333333]Control = $_.AccessControlType[/color] [color=#333333]User = $_.IdentityReference[/color] [color=#333333]Inheritance = $_.IsInherited[/color] [color=#333333]}[/color] [color=#333333]}[/color] [color=#333333]} | ? {-not $_.Inheritance} | export-csv C:\GetDirectoryACLs\Get_Directory_ACLs_Output.csv -force [/color]
  22. Phone for most of it due to using Google inbox and the desktop client being slow.
  23. I suspect in a business environment where all 100 devices are in use all day there will be different demands to education where only staff devices are in use all day. Here the ratio is around 1:250 but we've got a few IT suites that are only used a handful of times per week.
  24. I'll dig up my script that I've got lying around when I get into work. Should be easy enough assuming you've got a leavers OU or similar (to move the year 6 pupils to). Edit: After a bit of digging and playing around in the command line I'd probably try to do something like this (modify the OU path to match what you have): $OUs = Get-ADOrganizationalUnit -filter * -searchbase "OU=Students,OU=Users,DC=Domain,DC=Local" | Where {$_.Name -match "Year"} Foreach ($OU in $OUs) { $Users = Get-ADUser -filter * -searchbase $OU.DistinguishedName -properties Office $Users | Foreach { if ($_.Office -eq $OU.Name -or $_.office -eq $null) {Set-ADUser -identity $_.SamaccountName -Office "Year$([int]$OU.name.Substring(4) + 1)" -whatif}} $Users = Get-ADUser -filter * -searchbase $OU.DistinguishedName -properties office,homedirectory if (($OU.Name -eq "Year6" -and $Users[0].Office -eq "Year7") -or ($OU.Name -eq "Year11" -$Users[0].Office -eq "Year12") { $users | foreach { Move-ADObject -identity $_.Distinguishedname -TargetPath "OU=Leavers,OU=Students,OU=Users,DC=Domain,DC=Local" -whatif } New-item -path "\\server\studentshare\leavers\" -name "Year" -itemtype Directory -WhatIf $users | foreach { Move-item -path $_.HomeDirectory -destination "\\server\studentshare\leavers\year" -whatif; Set-ADUser -identity $_.Samaccountname -homedirectory "\\server\studentshare\leavers\year\$($_.samaccountname)" -whatif} } elseif ($OU.Name -ne $Users[0].Office) { $users | foreach { Move-ADObject -identity $_.Distinguishedname -TargetPath "OU=$($_.Office),OU=Students,OU=Users,DC=Domain,DC=Local" -whatif } $users | foreach { Move-item -path $_.HomeDirectory -destination "\\server\studentshare\$($_.Office)"; Set-ADUser -identity $_.Samaccountname -homedirectory "\\server\studentshare\$($_.Office)\$($_.samaccountname)" -whatif} } } I've got -whatif on the end of each command so you can run it and make sure it will actually do what you want. It's a little more complicated that it probably needs to be but that's to ensure that regardless of what order it runs in then it will hopefully only move the correct students up a group, the last thing anyone wants is all their student accounts in one OU and having to unpick which OU they should be in.
  25. This is pretty easy to achieve, I've got a similar script myself. The basics of it are below, our OUs are named after the intake year so it's pretty easy to do the calculation based on that to automatically work out which OU to deal with. For your naming system you could just use a parameter that you pass it and it does the work based on that instead. $ClosingIntakeGroup = (Get-Date).Year -5 $Users = Get-ADUser -Filter * -SearchBase "OU=$ClosingIntakeGroup,OU=Students,OU=Users,DC=Domain,DC=local" Foreach ($User in $Users) { Write-Output "Disabling account for $($User.SamAccountName)" Set-ADUser -Description "Disabled $(Get-Date)" -Identity $User.Samaccountname -Enabled $false -whatif } New-Item -Path "\\Server\StudentWork`$\Leavers\$((Get-Date).Year)" -ItemType Directory -Force -WhatIf Move-Item -Path "\\Server\StudentWork`$\$ClosingIntakeGroup\*" -Destination "\\server\StudentWork`$\Leavers\$((Get-Date).Year)" -WhatIf
×
×
  • Create New...