-
Posts
592 -
Joined
-
Last visited
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by Sephiroth
-
Disable password expiration for remote staff
Sephiroth replied to enjay's topic in Windows Server 2016
I second this. I can't recite much, but Know the basic construct and know how to find information, then put the 2 together in a coherent script. That's all I look for in a technician. -
Disable password expiration for remote staff
Sephiroth replied to enjay's topic in Windows Server 2016
$Users = Get-ADUser -SearchBase "OU=UserAccounts,DC=example,DC=net" -Filter * -Properties PasswordNeverExpires,ExtensionAttribute11 $UCount = $Users.Count $I = 1 Foreach ($User in $Users) { $Name = $User.SamAccountName $PWExpiry = $User.PasswordNeverExpires $EA11 = $User.ExtensionAttribute11 $Percent = [Math]::Truncate($I/$UCount*100) Write-Progress -Activity "Re-Setting Password Expiration" -CurrentOperation "Getting status for user: $Name" -PercentComplete $Percent -Status "$Percent% Complete | $I/$UCount" If ($EA11 -eq "ExpirePW" -and $PWExpiry -eq $True) { Write-Progress -Activity "Re-Setting Password Expiration" -CurrentOperation "Disabling Expiration for user: $Name" -PercentComplete $Percent -Status "$Percent% Complete | $I/$UCount" Set-ADUser -Identity $Name -Clear "extensionAttribute11" Set-ADUser -Identity $Name -PasswordNeverExpires $False } $I++ } -
Disable password expiration for remote staff
Sephiroth replied to enjay's topic in Windows Server 2016
This is how I did it: $Users = Get-ADUser -SearchBase "OU=UserAccounts,DC=example,DC=net" -Filter * -Properties PasswordNeverExpires,ExtensionAttribute11 $UCount = $Users.Count $I = 1 Foreach ($User in $Users) { $Name = $User.SamAccountName $PWExpiry = $User.PasswordNeverExpires $EA11 = $User.ExtensionAttribute11 $Percent = [Math]::Truncate($I/$UCount*100) Write-Progress -Activity "Disabling Password Expiration" -CurrentOperation "Getting status for user: $Name" -PercentComplete $Percent -Status "$Percent% Complete | $I/$UCount" If ($PWExpiry -eq $False) { Write-Progress -Activity "Disabling Password Expiration" -CurrentOperation "Disabling Expiration for user: $Name" -PercentComplete $Percent -Status "$Percent% Complete | $I/$UCount" Set-ADUser -Identity $Name -Add @{extensionAttribute11 = "ExpirePW"} Set-ADUser -Identity $Name -PasswordNeverExpires $True } $I++ } Gets the status for each user, and if it needs to set the password to never expire, writes "ExpirePW" into 'ExtensionAttribute11' so that you can easily undo it afterwards. -
We recently upgraded our setup from VMWare ESXi 5.5 on 3 hosts with SAN to 2 hyperconverged hosts on Windows Server 2019 using S2D. Our setup is much bigger than you've described; each host had 2 x 16 core processors, 128GB RAM, 8Gb networking (8 x 1Gb separated into 4 networks - LAN 3Gb, SAN 3Gb, VMotion 1Gb, and backup 1Gb); SAN with 15TB storage capacity connected by iSCSI. All that was replaced with 2 hosts direct connected at 10Gb to each other and LAN. With brand new hardware and consultancy, that cost us ~£35000. If you're willing to look at it yourself, then you could get a couple of second hand servers and do all that for a fraction of what we paid.
-
If you use a database with MDT this can be done easily by setting it against the machine in the settings.
-
Following on from @bald_pig, this should work... $Text = Get-Content C:\text_file.txt Foreach ($Line in $Text) { Msg * /server:Computer01 $Line Msg * /server:Computer02 $Line Msg * /server:Computer03 $Line }
-
To be honest with you, we are starting to have issues with this where GP thinks it's not installed, so tries to install it every time a machine starts. At the moment our 1st line tech is trying to get the script posted by @robyholmes to work for us, or (hopefully) to port it to Powershell, as that looks like it might at least be easier to debug when it goes wrong. If you want to test to see if my wrapping method works for you, this is the process that I follow: Use MSI Wrapper to create the MSI, using the standard install/uninstall silent commands (you'll see what I mean if you try it) (Optional) edit the MSI with something like orca to alter the name as it puts a load of rubbish at the end of the string Deploy with GP. If it's an update, you will need to manually tell it to supersede the previous version by adding the old versions into the 'Updates' section. GP should the uninstall all versions that it knows about and then install the new version. Test! As I said, we are having issues with GP's recognition of whether or not it is actually installed, possibly due to it not appearing as an installed application to the OS, which makes things all the more interesting! Best of luck though.
-
Not sure of OP's situation, but I provide a 6 character random password for my secondary students using the following script $LCase = $NULL For ($a=97;$a -le 122;$a++) { $LCase+=,[char][byte]$a } Function Get-Password { Param( [int]$Length=6, [string[]]$SourceData ) For ($Loop=1; $Loop -le $Length; $Loop++) { $TempPassword+=($SourceData | Get-Random) } Return $TempPassword } Get-Password -Length -SourceData $LCase The $LCase array lists all lower case ASCII charterers. I have arrays for Upper Case, Lower Case, Numbers and Symbols to pick from, but I'm not that cruel! That all gets dumped into a SQL database along with all their other details so that I can reset their passwords to the same thing each time, so the stickers that are printed for them in Yr7 remain accurate.
-
The bend radius for cat6 is 4x the cable diameter. As long as you stay within this tolerance, you should be fine.
-
Another option for those that don't use SCCM (like us) is to repackage the EXE into an MSI. I do this using MSIWrapper, present it with the silent install/uninstall commands and then push the MSI out with group policy. Works a treat! Better than relying on a script to run on the local machines and much better than manually updating the ~100 PCs where this is installed (which our lackey was doing previously )
-
You do almost exactly what I do, including the c# application to go with it! I can vouch that this is a very powerful means of querying logon/logoff events and reporting on them. I have a couple of Powershell scripts to report on different things within the database that I can run to help diagnostics. I find it useful to to see how much use a suite gets or if a member of staff has actually logged off and on again! As far as seeing existing goes, querying the event log with Powershell seems to be the best way of doing it simply, though it's not perfect.
-
I use MDT with a SQL database. All computers are setup in the database first, assigning name, applications/roles, default settings, etc. to the MAC address of the machine. Makes it so much easier as we just authenticate and it does everything. I've fudged the task sequence so that it's as close to zero touch as I can get without using SCCM!
-
Glad you got this sorted. WinForms is a pain to get your head around.
-
To use the buttons, you should be able to use this code: Function Get_RB { If ($RadioButton1.Checked) { $RB = "Read" } ElseIf ($RadioButton2.Checked) { $RB = "ReadAndExecute" } ElseIf ($RadioButton3.Checked) { $RB = "Write" } ElseIf ($RadioButton4.Checked) { $RB = "Modify" } ElseIf ($RadioButton5.Checked) { $RB = "FullControl" } Return $RB } Function Button1_OnClick { $RB = Get_RB $HomeFolders = Get-ChildItem $Textbox1.Text -Directory foreach ($HomeFolder in $HomeFolders) { $Path = $HomeFolder.FullName $Acl = (Get-Item $Path).GetAccessControl('Access') $Username = $HomeFolder.Name $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule ($Username,$RB,'ContainerInherit,ObjectInherit' , 'None', 'Allow') $Acl.SetAccessRule($Ar) Set-Acl -path $Path -AclObject $Acl } } Function Button2_OnClick { $RB = Get_RB $HomeFolders = Get-ChildItem $Textbox1.Text -Directory foreach ($HomeFolder in $HomeFolders) { $Path = $HomeFolder.FullName $Acl = (Get-Item $Path).GetAccessControl('Access') $Username = $HomeFolder.Name $Ar = New-Object System.Security.AccessControl.FileSystemAccessRule ($Username,$RB,'ContainerInherit,ObjectInherit' , 'None', 'Allow') $acl.RemoveAccessRule($Ar) Set-Acl -path $Path -AclObject $Acl } } You will need to set the Add_Click events for the buttons to these functions. You shouldn't then need button 3, as clicking on Button1 or Button2 will do everything. Let me know how it goes!
-
A couple of things to look at: [void]$Form.ShowDialog() should be the last line to run, otherwise it draws the form before reading the logic. The radio buttons can be referenced as $RadioButton1.IsChecked. A default can be set by doing $RadioButton1.Checked = $True Your radio buttons should be inside a GroupBox. Add the RadioButton controls to the GroupBox and add the GroupBox control to the Form. This means you can have multiple sets of radio buttons. Personally I prefer to put my action code (button click events, et cetera) in functions an call the function on form action. To read the text from $Textbox1, you need to reference the Text value... $Textbox1.Text Personally I don't like the way that PoshGUI.com arranges the code. I prefer to write it myself and order to my own liking. That's just me though Hopefully that helps.
-
I have a site full of Netgear switches. I have several stacks of M5300 L2+ switches and a core of an M7300 24 port SFP+ with L3 licence. I don't know if their ways have changed recently but check that it is L3 off the bat, and not L2+ with upgrade licence to L3. Also, I would be very careful of their support. We had a core switch failure and had to fight them to replace it. They required a credit card number as collateral on the advanced replacement, or I could wait for the faulty unit to reach them then they would send me a replacement. The switches themselves are really good for the money but because of their shady tactics on replacements, I won't be buying from them again. The last lot of switches we bought (for another campus) were Allied Telesys. Can't fault AT, as they came to site and gave a full survey, then told the supplier what we needed as they don't sell direct. The only problems we had were with the supplier, and they were dealt with quickly by AT.
-
We use exactly this for all classroom machines. Staff laptops and admin desktops are named e.g. BEY24126327. This is the case for admin desktops mostly because when the school was renumbers a few years ago (for SOR) the offices were never given any designation, despite our attempts to get them to understand. Student laptops are LT, e.g. MFLLT01. A subject has never got more than 60 laptops, so 2 digits is fine. Chromebooks are CB, e.g. CB001. These are not affiliated to a specific department so the numbering starts at 001 and will run through as many as we end up with. Of all of these conventions, the classroom desktops is the easiest to use as we know exactly where they are and don't have to search another system to locate them, particularly useful when tracking logon events for a particular user.
-
personally... ffmpeg: ffmpeg.exe -i -acodec libmp3lame
-
They are still doing it. It was explained to me recently that they market it towards people that take holidays to places that don't have charging infrastructure. Everything is covered except insurance and fuel, which is fair enough. On a similar note, Nissan (and probably others) are doing a borrowing scheme, where you take a new Leaf for a couple of days and drive it as your car so you can see how it'll go for you, how the charging is in your area and what the car is actually like to live with. Again, all you pay for are power and insurance.
-
Better still, invest in a thermal travel mug/thermos and take with you, saving another £10, and leave 45 minutes earlier. Then you arrive on time and £50 better off...
-
The way I see things, there are 2 main issues with EVs at the moment; The charging infrastructure is patchy and can be unreliable when it is there (though there has been a huge improvement over the last 2 years or so); And that range anxiety is still a very real issue. Just for some context, I have a 15 plate Leaf 24KWh with a 81 mile stated range, ~65-70 actual range depending on what I'm doing. my daily commute at the moment is about 60 miles so I stop on the way home for a 10 minute top up for peace of mind (in case of road works or similar). It's the only car that we have as a family of 4 (2 school age children). The first issue is a complex one, as we need more charging infrastructure and faster charging. Unfortunately EV charging it's still commonly compared to ICE fueling (5 minutes and you're off for another 400 miles), which is a little unfair, but this makes people want to charge within a certain time. As battery technology increases, it will take longer to charge. The tradeoff is that you don't do it as often. To go by the time limits means that the chargers need to up their ratings at the same pace as the battery tech. Alongside this, more and more EVs are on the roads, using more power at more chargers... how long do we have before the countries power infrastructure can't cope anymore? I'd wager not very long. Secondly, range anxiety is an issue if you think of EVs as electric equivalents of ICE cars. I have had my Leaf for the last 2 years. It is a challenge to start with, but something that you get used to. Yes, it takes me longer on some journeys, but I'm fine with that as long as I plan it. I often (once a month or so) go to see a friend who lives nearly 200 miles from me. I stop to charge twice on the way for about 30 minutes each time. In my car I have a list of all the chargers on the route that I could use without deviating from my route. Same when I drive to London (~100 miles), plan the route and know how far you can get, then list everywhere you can stop just in case. Just to reiterate the same point I tell everyone that asks about EVs, they are great if you are able to or have the mindset to plan ahead and don't need to rush around everywhere. If that's the case, EVs aren't for you at the moment (at least, pure EVs aren't. I don't know enough about hybrids to comment there, though I gather they may be more forgiving). I have come extremely close to flat (mostly due to charging infrastructure not working and having to find my way to the next charger, sometimes up to 40 miles away), but have yet to have the car stop. In those moments I have panicked slightly, but it's not much worse than running out of petrol. Again, it just needs planning... I have cover with my finance company that I can phone them and they take me to the nearest rapid charger, though as I said, I've not tested that one yet, and don't plan to
-
To be fair, the PC was reasonably priced thanks to @ICTDirect_Dave and one of his marvelous sales and none of the monitors I have were actually bought for me; The 4 4:3 screens were from classrooms, the 2 widescreen Samsungs were from old front office machines and the AOC was bought as a test for the music department (which they never followed through on anyway). I may have spent a lot of money on the graphics card though...
-
Feeling slightly guilty now... HP Z620 Xeon E5-2670 8 Core 2.6GHz 32GB RAM 1 x 512GB SSD 2 x 1TB HDD AMD FirePro W600 graphics (6 x mini-DP) AMD Radeon HD7450 4 x Samsung B1740 1280x1024 LCD displays 2 x Samsung SC23C650 1080x1920 (Vertical) displays 1 x AOC I2360P 1920x1080 display
