Jump to content

TechMonkey

Members
  • Posts

    7,550
  • Joined

Everything posted by TechMonkey

  1. I thought this phrase book was the worst?
  2. There are various Bromcom staff on here. @Bromcom_mark and @Bromcom-PR may be along in a second to help.
  3. This is the way I don't know why that has happened. I was running it from a standard PowerShell command window, pasting all the code in. I edited it in VisualCode which interestingly showed a lot of errors in the terminal, so maybe it is an ISE issue, not fully interpreting output. Trust me, I am in no way an expert, just muddling through on what I need and started out like you, grabbing code and making it work how I wanted. So, don't worry and don't hesitate to ask questions
  4. So, I've made this work: Function Get-Compinfo { [CmdletBinding()] Param( #Want to support multiple computers [Parameter (ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true)] [Alias("HostName", "CN")] [string[]]$ComputerName = (Read-Host 'Enter Computername or Ip Address'), #Switch to turn on Error logging [switch]$ErrorLog, [string]$LogFile = 'D:\Documents\Powershell\errorlog.txt' ) Begin { $apps = @() $systemapp = "This is systemapp" function to_yellow ($msg) { "$([char]0x1b)[93m$msg$([char]0x1b)[0m" } function to_green ($msg) { "$([char]0x1b)[32m$msg$([char]0x1b)[0m" } function to_red ($msg) { "$([char]0x1b)[91m$msg$([char]0x1b)[0m" } } Process { #$Computers = Get-Content D:\Documents\Powershell\computers.txt ForEach ($Client in $ComputerName) { if (Test-Connection -Computername $client -BufferSize 16 -Count 1 -Quiet) { $System = Get-WmiObject -Class Win32_ComputerSystem -ComputerName $Client $Bios = Get-WmiObject -Class Win32_Bios -ComputerName $Client $os = Get-Wmiobject -ComputerName $Client -Class Win32_OperatingSystem $Disk = Get-WmiObject -ComputerName $Client -class Win32_LogicalDisk -filter "DeviceID='c:'" $IP = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'True'" -ComputerName $Client $CPU = Get-WmiObject win32_processor -Computername $Client $Chrome = Get-WmiObject -ComputerName $Client -Class CIM_DataFile -Filter "Name='C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe'" $SystemSKUNumber = Get-WmiObject Win32_BIOS | Select-Object SystemSKUNumber $WinVer = Invoke-Command -ComputerName $Client -ScriptBlock { (Get-Item -Path 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion').GetValue("DisplayVersion") } [PSCustomObject]@{ 'ComputerName' = $System.Name 'Manufacturer' = $System.Manufacturer 'Model' = $System.Model 'Product ID' = $System.SystemSKUNumber 'Serial Number' = $systemapp= (to_green $Bios.SerialNumber) 'Username' = $System.Username 'IP Address' = $IP.ipaddress[0] #'0' tells it to only get the IPV4 address# 'DNS' = $IP.DNSServerSearchOrder 'Gateway' = $IP.DefaultIPGateway 'MAC Address' = $IP.macaddress 'Network Card' = $IP.Description 'OS Name' = $os.caption 'OSBit' = $OS.OSArchitecture 'WinVersion' = $systemapp= (to_yellow $Winver) 'Build Version' = $os.version 'Chrome Version' = $Chrome.Version 'LastBoot' = [Management.ManagementDateTimeConverter]::ToDateTime( (Get-WmiObject -Class Win32_OperatingSystem -Computer $client | Select -Exp LastBootUpTime) ) 'Memory(GB)' = "{0:N2}" -f ($System.Totalphysicalmemory / 1gb) 'DiskSize(c:)' = "{0:N0}" -f ($Disk.Size / 1gb) 'FreeSpace(GB)' = "{0:N0}" -f ($Disk.Freespace / 1gb) 'UsedSpace(GB)' = "{0:N0}" -f ($Disk.size / 1gb - $disk.FreeSpace / 1gb) 'PercentFree' = "{0:P0}" -f ($Disk.Freespace / $Disk.Size) 'CPU' = $CPU.name }#End pscustomobject block #$Obj=New-Object -TypeName PSObject -Property $Prop #Write-Output $Obj }#End If block Else { [PSCustomObject]@{ ComputerName = $Client Manufacturer = "Not online" } #End pscustomobject block } #End Else } #End Foreach loop }#End Process End {} } #End Function}#End Process Get-Compinfo Chages are the adding $apps = @() $systemapp = "This is systemapp" function to_yellow ($msg) { "$([char]0x1b)[93m$msg$([char]0x1b)[0m" } function to_green ($msg) { "$([char]0x1b)[32m$msg$([char]0x1b)[0m" } function to_red ($msg) { "$([char]0x1b)[91m$msg$([char]0x1b)[0m" } Into the Begin{} bit and wrapping $systemapp= (to_green XXX) round the Serial Number variable and the yellow version around the WinVersion variable. It appears to work, though I don't get any output for WinVersion so can't test that. I have no idea if this is the best way. I have to confess I don't fully understand the script as no output is called. To answer your question 'Serial Number' = $Bios.SerialNumber is writing out that line to the screen but dynamically replacing $Bios.SerialNumber with the variable set higher up.
  5. Ah, your issue is that all the information is pulled into an Object (the but after [PSCustomObject]) and then printed out as a big block of text. The Write-Host method won't work as that outputs to screen instantly. Two seconds, & I'll see if there is any alternative to you, instead of rewriting the whole thing!
  6. Our lesson data isn't being synced and day two of waiting for a response from their support team....
  7. Happy to take a look, but if all you want is the colour of the text that is written out to be changed then take a look at the documentation for Write-Host, especially Example 4. Essentially you want to set -ForegroundColor to a colour if you want the text to change or -BackgroundColor if you want the area around the text to change.
  8. Sorry no help to you but are they too wide for the desk space or some other reason? I've never heard of a DSE worrying about the size of a keyboard.
  9. If the Follow You option is not there when you go to print, that sounds like a Windows/OS/Server issue, not a Papercut issue. Can you install the printer manually? Can you see the printer if you navigate to the server?
  10. Which was what they were doing. So, I am confused at your point. You've gone from the only crash on the DLR was human error to yes the crash was valid as they were testing? What time frame were those crashes over? & yet we have an Uber death & forty-eight confirmed Tesla fatalities.
  11. You said too often, makes it sound endemic. In 2022 there were 7 reported alcohol violations in the US, for around 16.4 million departures. If you didn't selectively copy and paste it also helps. From the same article you copied from regarding the 10th March 1987: So testing for a software fault that would have caused a worse incident happening. Beyond that I'm not sure the point of your post, you are just repeating what I said. There has been more than one crash on the DLR and both have involved automated systems.
  12. Part of the issue is hyperbole like this though. Flying is still counted as the safest form of transport, so saying all the pilots are sleep deprived, depressed, alcoholics is just provably incorrect and makes any argument it is attached to look silly. Your DLR example is also silly as there have been two crashes. One was a software issue they were testing, so actually goes against your point; the other was between 2 trains, one automated, one manual. I'd count the latter as a no score draw. Using the DLR as an example would bring up an incident where someone fell in front of one of the trams and due to no driver didn't stop, though there would have been time and space to do so. Using facts and figures are a much better way than silly snarky comments as all they do is distract from the matter at hand.
  13. On the difference question, I'd say by being very careful about mapping your outcomes, not processes, and ensuring the companies you tender to answer the question fully "Can it do all of these things". Having to do something different is just an inevitable situation and not something that I would even keep track of. Users will always say that because it is different it is worse, until they are used to it and won't remember any difference. Your outcome needs to be precise, "output in a transferable format" is fine but if your next process has to have a JSON file your outcome needs to be "outputs in JSON format". If a company says it does the latter and then your process doesn't work as the output is only in CSV, then that is a lie and needs to be addressed, but if it outputs in CSV then they have fulfilled your requirement. If a company lets you know they do not meet one of your requirements, then it is up to you and your leadership how much weighting that has and to listen to the company to see if they have a reason that requirement is not met.
  14. Yes I do. I've found some of our studious staff who setup MFA as soon as we asked them to seem to still having to use the old enter the code from your phone mode or the pop up accept mode. In my view the numbers view is better as it prevents the result of MFA fatigue, of just pressing accept when the pop up appears, or having to actually use something the website gives you. Not sure how to do it at the moment, I'll report back if I find something. As for IP conditional access, as Roberto says, it is part of Zero Trust, but shouldn't be the only check. We are looking at the options like adding Entra Joined as another conditional. So, a member of staff onsite would have to use MFA to access their emails on their personal phone, but not on their work device. We are looking at other options as well. As ever it is weighing up the possibilities and finding the line you are happy to defend and the compromises that get you there. But I've not found anything about Cyber Essentials banning IP based conditional access.
  15. Can you point out where this is documented? I haven't seen any changes regarding this and can't find any having had a quick look.
  16. We do have safe locations set for the school sites as a compromise to staff. Setting up MFA must be done on site, to prevent unauthorised setup, and staff are reminded multiple times. I need to find a way to check and force an update on those that set it up a while ago and are not using the new MS number MFA. I'm also seriously considering being a nasty get and seeing if there is a way to enforce MS Authenticator. We also have a general block on any country that hasn't been requested to be allowed. So far we only have very few allowed countries, a few that regular trips go to and we have international students so we can't lock down as much as we would like.
  17. This rings alarm bells, no pun intended. Not wanting to be grumpy, but does the laptop connect to the school Wi-Fi? If yes, does it connect to any other Wi-Fi? If yes, the laptop works as intended and the issue is with their Wi-Fi, which is not your issue. There are too many variables as someone has fiddled. We have had old laptops that just would not see certain SSIDs, so we replaced them. If that is not possible, and the above-mentioned questions are all in the positive then you have exhausted your remit. To put it another way, what would be their response if you asked them to sort out your blood relatives' deficiencies in their chosen subject? BUT if they would like to pay £299.99 for an hour of your time then you can possibly fix it.
  18. If the school can stretch to it, LinkedIn learning have a lot of these types of courses. Excel Data Analysis
  19. Again, this is all a bit fuzzy but I'm pretty sure KMS is only used if the KMS key is entered to the device. It may generate an error in event viewer, but no adverse issues or over rights
  20. Been a while since I did activation services but I seem to recall it is either DNS based or an Active Directory field that sets the server. Best way to check is to look up a "how to remove..." guide, or find a "how to install..." guide and see what might need removing. My suggestion would be to just leave it as it won't cause any issues and eventually will be redundant and will get removed when you update servers.
  21. IRMS Toolkit is what I was going to suggest.
  22. Sorry, I've not used them. It was just looking at the Yealink devices. They use a full tablet, the e-reader ones are nice and probably easier to install as no wires, but for the extra functionality might be worth the others.
  23. Not awful, but for £100 less you can get a tablet that will allow you to book from the tablet and is POE.
  24. Joan was the one all over the place when I last looked. But looking at the price of that compared to something like the Yealink tablet based system I can't see why!
  25. Planet eStream is the digital successor to the old TV and VHS in the corner. Though it looks like they have had a rebrand into just eStream. It allows recording from freeview broadcast, as well as uploading your own resources. If one person has recorded something, then everyone has access to it. You also get 30 days back recording and a whole host of other content. Not cheap, but I seem to remember it was cheaper than ClickView. They have been bought out by UniGuest since I last used them so I cannot comment on how the company is now. Used to be very responsive and friendly.
×
×
  • Create New...