Root Access

For all you Super Users out there. You have backups, right?
Oct 9, 2019 00:17
@rahuldottech Busy! But it's been fun. Are you in college now?
Oct 9, 2019 00:17
@Burgi Not yet - currently in junior year :)
Oct 9, 2019 00:14
:D
Oct 8, 2019 15:24
@Burgi Hi! Good to see familiar faces (familiar icons?) still here after so long :)
Oct 8, 2019 15:23
I notice a Type property that seems to be set to "Local" for local printers (-Name set), maybe you could check that and put -Name or -ComputerName in the glob hash as appropriate?
Oct 8, 2019 15:20
@MichaelFrank Oh, it's globbing? The vast majority of the parameters in the output of Get-Printer only correspond to the complicated parameter sets of Add-Printer
Oct 8, 2019 15:19
You can just close the Bash window
Oct 8, 2019 03:49
Looks like -Name is for local printers and -ConnectionName is for connecting to a shared network printer?
Oct 8, 2019 03:48
I think the safest bet in terms of PowerShell being able to decide a single parameter set is -Name, but from skimming the documentation it looks like -ConnectionName and -Name don't mean the same thing
Oct 8, 2019 03:36
For which specifying -ConnectionName (first, simple set) or -Name (third, more featureful set) rather than passing the name as a positional parameter should work
Oct 8, 2019 03:35
One set (the second one listed) seems to require -PortName, so you probably need to disambiguate between the first and third
Oct 8, 2019 03:31
Hmm, do you know which parameters are needed?
Oct 8, 2019 02:48
Hi!
Oct 8, 2019 02:33
May I see the Param block that's giving you trouble?
Oct 8, 2019 02:33
Making an optional parameter mandatory for one set might help
Oct 8, 2019 00:24
If you've already rebooted the machine or reopened the command prompt, maybe the path is too long and getting truncated? Though I'm on Windows 10 and my path seems to be well over 2000 characters with no problems
Mar 21, 2019 23:57
Afraid not, sorry :/
Mar 21, 2019 23:40
Can confirm that stopping the beep driver removes that sound
Mar 21, 2019 23:36
Oh, I recognize that sound now - I heard it when I pressed too many keys at once in a video game
Mar 21, 2019 23:32
Beep is a user-mode function that seems to, at least in some Windows versions, rely on the beep driver
Mar 21, 2019 23:30
Is there a user-mode API that operates via the beep driver?
Mar 21, 2019 23:22
(that's total speculation, I'm not sure of the architecture related to delivering input to windows)
Mar 21, 2019 23:21
Maybe the window manager does this when it tries to enqueue an input message to a full message queue?
Mar 21, 2019 23:18
A Microsoft representative(?) seems to confirm that it does indeed indicate that the system is busy
Mar 21, 2019 23:16
That's... very interesting, I hadn't noticed that
Mar 21, 2019 01:42
(edited a bunch of times there, sorry)
Mar 21, 2019 01:42
You could have a variable that's initially $false and gets set to $true after one iteration of the loop, then pass -HideTableHeaders:$showedHeaders to Format-Table
Mar 21, 2019 01:40
Nice!
Mar 21, 2019 01:38
Does the Format-Table consistently fix it?
Mar 21, 2019 01:37
Without anything to explicitly say "put this stuff on the screen", we were relying on the default printing after the output eventually falls out the pipeline
Mar 21, 2019 01:37
foreach captures the output of the stuff inside it, so you can assign a whole foreach block to a variable
Mar 21, 2019 01:36
Ohhhhhh I think I see
Mar 21, 2019 01:35
Does adding [Console]::Out.Flush() after the Get-ADUser line also fix it?
Mar 21, 2019 01:35
Hm, maybe buffering-related? I've never encountered a problem with that in PowerShell before
Mar 21, 2019 01:33
Now that's interesting
Mar 21, 2019 01:29
Or if you do only the foreach without the enclosing while or the sleep in a fresh prompt, do you get AD data?
Mar 21, 2019 01:26
Like $users | Get-ADUser -Properties EmailAddress | select ...
Mar 21, 2019 01:25
Let's see if we can pipe $users directly into Get-ADUser, removing the need for a loop
Mar 21, 2019 01:23
Interesting
Mar 21, 2019 01:22
Is the ... a bunch of 2s and 3s?
Mar 21, 2019 01:16
Does the problem also appear if the wait time is short, like 5 seconds?
Mar 21, 2019 01:16
Hmm, if you sprinkle Write-Host lines around, do they execute in the expected order? Maybe put one before the for-each, one inside the for-each, and one before the sleep
Mar 21, 2019 01:13
Get-ADUser is probably finding nothing
Mar 21, 2019 01:13
I'm pretty sure that should be synchronous - what kind of values does $users hold?
Jan 8, 2019 17:04
Hi!
Jan 1, 2019 00:00
"DONG`n"*12
Dec 31, 2018 18:20
\o/
Dec 16, 2018 01:58
Pattern and context and attitude are more important
Dec 16, 2018 01:58
It's more a thing of "please don't" but I think instant suspension for it is a little excessive
Dec 16, 2018 01:58
@allquixotic Unsuspended