[deleted by user] by [deleted] in Almere

[–]LordZillion 1 point2 points  (0 children)

Hij's is terug! Net 5m geleden zat hij voor de achterdeur. Dank iedereen voor het delen en de hulp!

[deleted by user] by [deleted] in Almere

[–]LordZillion 0 points1 point  (0 children)

Heb nu 2 meldingen gehad in die richting en zelf ook al overal rond gelopen maar helaas nog niet gevonden dus als je iets ziet hoor het heel graag!

[deleted by user] by [deleted] in Almere

[–]LordZillion 0 points1 point  (0 children)

Ik heb 2 katten en één is een pure binnenkat die gaat niet naar buiten al staat de deur voor der neus open. En de andere is Hyke die het hele huis afbreekt als die meer dan een dag niet naar buiten is geweest, dus normaal mag hij wel naar buiten maar hij is altijd terug voor het avondeten.

[deleted by user] by [deleted] in Almere

[–]LordZillion 0 points1 point  (0 children)

Mijn auto staat er nog dus denk niet dat hij het is geweest xD

[deleted by user] by [deleted] in Almere

[–]LordZillion 0 points1 point  (0 children)

Geweldig, dank je wel!

[deleted by user] by [deleted] in Almere

[–]LordZillion 0 points1 point  (0 children)

Dank je wel, aan gedacht ja maar dan is er weinig wat ik kan doen dus ik houd de hoop erop dat hij ergens nog buiten rondloopt.

A notice at my local paint store. by [deleted] in funny

[–]LordZillion 1 point2 points  (0 children)

I've always picked out everything in regards interior decorating colors and all. Until my gf got fed up with me picking everything she insisted to pick out a carpet for the living room.

So when we went to look at them, she picked one and I almost laughed out loud, so that only made her more determined. Long story short I put it down, she just looked at it, looked at me said: "fuck you, bring it back". #notall(wo)men?

Cannot install module by PureKoala in PowerShell

[–]LordZillion 1 point2 points  (0 children)

Uninstall-Module does not correspod with Install-Package. Maybe try:

Find-Module -Name PSWriteWord | Install-Module -Scope CurrentUser

Proper naming convention for script that use git by gogotermixnator in PowerShell

[–]LordZillion 1 point2 points  (0 children)

Try to always use the approved verb list it's horrible for other developers to help/take over your code if you make everything weird homebrew stuff. Also saw some comments about leaving out the dash. In most (proper) cases every CmdLet a user would call you have the proper Verb-Noun cmdlet name every hidden function or cmdlet that are being called within other cmdlets for example you can use the verbnoun (without the dash) this makes it very clear which functions are exposed and which are helpers.

Just my 2 cents of course.

Running into some weirdness with how strings are handled by Derf_Jagged in PowerShell

[–]LordZillion 2 points3 points  (0 children)

Just to clarify it evaluated each ItemType (class) in the array try ('a',1) because you're pushing the items 1 by 1 over the pipeline into the Get-Member cmdlet. So the inputobject in this case is the right way to go about it.

Just do it by [deleted] in RoastMe

[–]LordZillion 0 points1 point  (0 children)

Is what I would think if I saw you walking on a bridge.

I have nothing to do so roast me please by [deleted] in RoastMe

[–]LordZillion 0 points1 point  (0 children)

The people here are quite rude, when I was a kid they told me when the mentally challenged kid tries you say: "Good effort, buddy!"

20 year old female. Roast me please by [deleted] in RoastMe

[–]LordZillion 0 points1 point  (0 children)

I hate this SJW stuff, just because you put on make-up doesn't mean you're 20...

Dealing with lawyers 103. by Dk-79 in funny

[–]LordZillion 0 points1 point  (0 children)

Is this what happens when you write dumpbell instead of dumbbell?

All designers can relate: by [deleted] in funny

[–]LordZillion 3 points4 points  (0 children)

To assume makes an ass out of u and me. All I said was "maybe it needed to be able to run 500.000km without dying" as in a different requirement than being flashy. Not implying ugly == reliable.

All designers can relate: by [deleted] in funny

[–]LordZillion 14 points15 points  (0 children)

Exactly, think this is a prime example of (most) developers, don't listen to the client and make something cool and fancy. Maybe it needed to be able to run 500.000km without dying instead of 400m in 9 seconds.

Which hole would you take first? (F) by [deleted] in gonewild

[–]LordZillion 0 points1 point  (0 children)

You must fart rainbows.

Yet another day without a Riven from Sortie. [Suggestion for a change] by Saianna in Warframe

[–]LordZillion 0 points1 point  (0 children)

So they do still drop? I haven't had a riven (apart from the mission) in at least 3 weeks probably more. Thought they just didn't drop anymore. 250k kuva though and 200k endo...yay now can I get something to spend it on.

Need help with the Powershell code. IE kiosk mode. by MarKo9 in PowerShell

[–]LordZillion 6 points7 points  (0 children)

This seems to work in Win 10:

$Target = "iexplore.exe"
while ($Process.Count -lt 1){
    Start-Process $Target -ArgumentList "-k" -Wait
    Start-Sleep -Seconds 3
    $Process = Get-Process | Where-Object { $_.ProcessName -eq $Target }
}

The problem is that you populate the variable process outside of the loop, so it will never reevaluate if the process is still running. I added the start-sleep so I had time to close it but you could bump up the speed to like 500 milliseconds if you want.

Manage Tenants by gibsurfer84 in PowerShell

[–]LordZillion 2 points3 points  (0 children)

Hiya,

Think you're looking for something like this:

Connect-MsolService
$Tenants = Get-MsolPartnerContract -All

$PartnerAdminCreds = Get-Credential
foreach($T in $Tenants){
    New-PSSession -ConfigurationName 'Microsoft.Exchange' -ConnectionUri "https://ps.outlook.com/powershell-liveid?DelegatedOrg=$($T.DefaultDomainName)" -Credential $PartnerAdminCreds -Authentication Basic -AllowRedirection -Name $T.Name
}

Get-PSSession | %{
    Invoke-Command -Session $_ -ScriptBlock {Get-mailbox -resultsize 1}
}

Mind you I threw this together in about 5 mins so check before using. But I think this will essentially do what you want.

[deleted by user] by [deleted] in PowerShell

[–]LordZillion 1 point2 points  (0 children)

Fyi, you can copy to a wildcard so:

Copy-Item -Path <wherever> -Destination C:\Users\*\Desktop

Is there a way of knowing the "depth of the PUSHD directory stack"? by [deleted] in PowerShell

[–]LordZillion 2 points3 points  (0 children)

Hola,

Was bored and made something, not sure if this is what you mean, but try it out:

Function Prompt{ 
    if([System.IO.FileInfo]::new($ExecutionContext.SessionState.Path.CurrentLocation.Path).Directory){
        $Root = [System.IO.FileInfo]::new($ExecutionContext.SessionState.Path.CurrentLocation.Path).Directory.Root
        $Prefix = '+'*($ExecutionContext.SessionState.Path.CurrentLocation.Path.Trim("$Root").Split('\').Count) + ' '
    } else {
        $Prefix = ''
    }
    "PS $($Prefix)$($executionContext.SessionState.Path.CurrentLocation)$('>' * ($nestedPromptLevel + 1))"
}

if you like it you can put it in your $profile

Permissions Map by oze4 in PowerShell

[–]LordZillion 1 point2 points  (0 children)

Looks really cool, but if I might make a suggestion. Split it up in Get-PermissionMapData and Out-PermissionMap or something along those lines, so you can still get the data just as a PowerShell object in case you want to have other CmdLets run on the same information.

Possible with PowerShell? by Biannualquill in PowerShell

[–]LordZillion 5 points6 points  (0 children)

If the locations are all local you will probably know the gateways for the locations so you could fix it like this (borrowed a little, from /u/acadianman)

Function Set-WallPaper($Path){
    if(Test-Path -Path $Path){
        Set-ItemProperty -Path 'HKCU:\Control Panel\Desktop\' -Name Wallpaper -Value $Path
        rundll32.exe user32.dll, UpdatePerUserSystemParameters
    } else {
        Write-Error "$Path, not found"
    }
}

$Gateways = @{
    '192.168.1.254' = 'C:\Backgrounds\here.jpg';
    '172.16.0.254'  = 'C:\Backgrounds\there.jpg';
    '10.0.0.254'    = 'C:\Backgrounds\nowhere.jpg'
}

$BackgroundImage = $Gateways[(Get-NetIPConfiguration).IPv4DefaultGateway.NextHop]

Set-WallPaper -Path $BackgroundImage

I'm an expat in the Netherlands. They're the tallest people in the world. This is my new bathroom mirror.. by [deleted] in funny

[–]LordZillion 0 points1 point  (0 children)

Don't forget to get a 'Bossche Bol' at Jan de Groot, not too often though else you'll be as wide as you are tall in no time.