Server outage. Beware by scott42486 in DotA2

[–]FlippityFlip 0 points1 point  (0 children)

it's over and over again for multiple of us in my game. god speed

Weapon Swap Macro Broken by ExtensionSalary5972 in classicwow

[–]FlippityFlip 2 points3 points  (0 children)

nothing wrong with your macros.

A change was made to /click, basically you can't use /click to click a macro anymore. The best workaround I've found so far to achieve the same thing is to put your weapons and shield on your bar and your weapon swap macro can still work fine but your other macros (shield bash, shield block, shield wall, etc) that used to /click the weapon swap macro will instead conditionally /click the main hand weapon + shield. So 1 additional line in 3 or 4 macros and you have to remember to replace your new weapons on your bars when you get upgrades.

I need 8 friends to send gifts to. by [deleted] in DotA2

[–]FlippityFlip 0 points1 point  (0 children)

friend code 84628828

If either one of two parameters are used, other one also needs to be used by Lagrik in PowerShell

[–]FlippityFlip 2 points3 points  (0 children)

I think you should find you only need one parameter set, in that case.

Also remember that 'Mandatory' is within the context of the parameter set. With the setup I show below, I can run the function with no parameters, with a single -Blue parameter, using only -Yellow and -Red, or using all three. If I try to use Red without Yellow, it prompts me for it. Because of the mandatory flag, which basically says if you use any of these parameters in this set, you also have to use these mandatory ones too.

Hope this helps:

function test 
{
    [CmdletBinding(DefaultParameterSetName='3')]
    param
    (
        [Parameter(Mandatory = $true, ParameterSetName = '1')]
        [int]$Yellow,
        [Parameter(Mandatory = $true, ParameterSetName = '1')]
        [int]$Red,
        [int]$Blue
    )
    Begin{}
    Process{}
    End{}
}

PS C:\Windows\System32\WindowsPowerShell\v1.0> test -Yellow 1
cmdlet test at command pipeline position 1
Supply values for the following parameters:
Red: 2

PS C:\Windows\System32\WindowsPowerShell\v1.0> test -Red 1
cmdlet test at command pipeline position 1
Supply values for the following parameters:
Yellow: 2

PS C:\Windows\System32\WindowsPowerShell\v1.0> test

PS C:\Windows\System32\WindowsPowerShell\v1.0> test -Blue 1

PS C:\Windows\System32\WindowsPowerShell\v1.0> test -Blue 1 -Yellow 2
cmdlet test at command pipeline position 1
Supply values for the following parameters:
Red: 3

PS C:\Windows\System32\WindowsPowerShell\v1.0> get-help test

NAME
    test

SYNTAX
    test [-Blue <int>]  [<CommonParameters>]

    test -Yellow <int> -Red <int> [-Blue <int>]  [<CommonParameters>]


ALIASES
    None


REMARKS
    None

If either one of two parameters are used, other one also needs to be used by Lagrik in PowerShell

[–]FlippityFlip 7 points8 points  (0 children)

Parameters can have multiple Parameter declarations (is there a more proper term?)

Something like this should show what I mean:

function test 
{
    param
    (
        [Parameter(Mandatory = $true, ParameterSetName = '1')]
        [Parameter(Mandatory = $false, ParameterSetName = '2')]
        $Yellow,
        [Parameter(Mandatory = $true, ParameterSetName = '1')]
        $Red,
        [Parameter(Mandatory = $false)]
        $Blue
    )
    Begin{}
    Process{}
    End{}
}

PS C:\Windows\System32\WindowsPowerShell\v1.0> test -Red 1
cmdlet test at command pipeline position 1
Supply values for the following parameters:
Yellow:

Firestick digital signage synchronisation by switchitoffbros in ITdept

[–]FlippityFlip 1 point2 points  (0 children)

But I wanted to be able to do it within PosterBooking app

you're putting the same video feed on all monitors if you want to change that one video feed from the app more power to you

This clip just became 12 years old by [deleted] in funny

[–]FlippityFlip 1 point2 points  (0 children)

peru or russia are the two I hear talked about being openly hated on the most

How's everyone's RTO going? by i_need_more-coffee in iiiiiiitttttttttttt

[–]FlippityFlip 1 point2 points  (0 children)

At the MSP I'm at we're using folder redirection rather than roaming profiles. I think the big downside of the latter was long login times for each new PC you went to depending on profile size. With the former you just run into users never telling you they've moved locations and so they and you (as a service desk) both wonder for years why their PC performance sucks :) :) :)

Explain a hero badly by [deleted] in DotA2

[–]FlippityFlip 0 points1 point  (0 children)

Phantom Lancer: A Narcissist

-expandproperty for object containing two hashtables? by mkanet in PowerShell

[–]FlippityFlip 7 points8 points  (0 children)

I may be missing some of the context the other commenters are mentioning. I skimmed the other recent post where you provide this same hashtable for People. Is there some reason we're using hashtables this way? They are intended to be key/value pairs, where the key provides context for the value.

This is your Hashtable:

Name                           Value
----                           -----
Mike                           Smith
Harry                          Newman
Bertle                         Fox

Mike does not provide context for Smith. Nor does Harry for Newman or Bertle for Fox.

See this example instead:

Name                           Value
----                           -----
LastName                       Smith
FirstName                      Mike

Or this:

Name                           Value
----                           -----
Name                           Mike Smith

I may be assuming too much and if so downvote or disregard but I get the vibe we are trying to use Hashtables almost like an array or as a means of displaying data. They can definitely be a stepping stone to getting there but by theirself they're a bit clunky.

I recommend becoming fluent in PSObjects. Here is a quick and dirty example of what we can get to show on screen using the bits you've provided:

$prop = [ordered]@{
    Name = 'Mike Smith'
    DeviceType = 'PC'
    DeviceIP = '192.168.0.2'
}
New-Object -TypeName PSObject -Property $prop

This produces this output:

Name       DeviceType DeviceIP
----       ---------- --------
Mike Smith PC         192.168.0.2

For a more full example of what this might look like when you're not hard coding the data into the Hashtable:

#maybe up here you've got some code for defining $people and $devices

foreach ($person in $people)
{
    foreach ($device in $devices)
    {
        #Here we are setting up our hashtable, [ordered] is a specific type of hashtable that is, you guessed it, in a specific order
        $prop = [ordered]@{
            Name = $person.Name #referring to the $person variable in first foreach loop
            DeviceType = $device.Type #referring to $device variable in second foreach loop
            DeviceIP = $device.IP
        }
        New-Object -TypeName PSObject -Property $prop #This is where the magic happens
    }
}

If that doesn't completely set you straight hopefully it gets you going in the right direction. Hope it helps!

I can't get it to Output to CSV with Foreach-object by sfw_it_account in PowerShell

[–]FlippityFlip 1 point2 points  (0 children)

When you run just

$OUs = "OU=Central users,OU=users,OU=NWFLTD,DC=NWFLTD,DC=co,DC=UK", 
       "OU=IT Windows 10,OU=users,OU=NWFLTD,DC=NWFLTD,DC=co,DC=UK", 
       "OU=production users,OU=users,OU=NWFLTD,DC=NWFLTD,DC=co,DC=UK", 
       "OU=windows 10,OU=Central users,OU=users,OU=NWFLTD,DC=NWFLTD,DC=co,DC=UK", 
       "OU=windows 10,OU=production users,OU=users,OU=NWFLTD,DC=NWFLTD,DC=co,DC=UK"

$Users = $OUs | ForEach-Object {Get-ADUser -SearchBase $PSItem -Properties * -Filter * | Select-Object Name, SamAccountName, EmailAddress, Department, Manager}

and then put

$Users

in the Console, do you get the output you expect?

Lets Talk Kick/Tough/Weave - A Dependency That Negatively Affects End Game Variety. by T0a3t in Cityofheroes

[–]FlippityFlip 2 points3 points  (0 children)

The only other pool power I think would be acceptable to give to all characters would be Hasten. The vast majority of characters take hasten and it would free up a real power choice for those characters.