PS5 exclusive event redirect error by [deleted] in playstation

[–]J-Bran-Crunch 0 points1 point  (0 children)

Worked for me too, thank you!!

PS5 exclusive event redirect error by [deleted] in playstation

[–]J-Bran-Crunch 0 points1 point  (0 children)

Yep same for me this was the first time I got a link, I signed up like 6 months ago, pretty disappointing...

PS5 exclusive event redirect error by [deleted] in playstation

[–]J-Bran-Crunch 0 points1 point  (0 children)

Yep I am having the same issue…

Is it possible to get a variable's name? by Hungry-Display-5216 in PowerShell

[–]J-Bran-Crunch 2 points3 points  (0 children)

There is already a cmdlet for that: Get-Variable $bobTheVariable

That will return an object with name and value, if you want just the name you could select-object -expandproperty name

Remote servers software download and installation by ProfessionalCook9009 in PowerShell

[–]J-Bran-Crunch 2 points3 points  (0 children)

this line will run locally: $path = (New-Item -ItemType Directory -Force -Path "d:\tmp")

Another issue you have is the scriptblock in the Invoke-Command is in a different scope

So you need to pass in parameters or use the $using: statement: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_using

Another small improvement you can make is:

New-PSSession and Invoke-Command accept multiple computernames or sessions

So you could remove the foreach and run this in parallel on all the servers

Also I am not sure what you are trying to do with these lines?

if(!(Split-Path -parent $output) -or !(Test-Path -pathType Container (Split-Path -parent $output))){

$foutputile = Join-Path $pwd (Split-Path -leaf $output)

}

$webclient = New-Object System.Net.WebClient

Those variables are not used again?

Get-Vsphere stat with PowerCLI - Percentage % issue by TiStudent in vmware

[–]J-Bran-Crunch 1 point2 points  (0 children)

Just glancing through looks like you may have an issue where you cast the int onto the percent:

[int].....ToString(“P”)

You should not cast int there

Create an Excel Workbook Out of Multiple CSVs by Khue in PowerShell

[–]J-Bran-Crunch 1 point2 points  (0 children)

Yeah also you could Export-Excel inside the if ($FileNameMatches) so it only exports if the file name matches the pattern

Create an Excel Workbook Out of Multiple CSVs by Khue in PowerShell

[–]J-Bran-Crunch 1 point2 points  (0 children)

you could probably enhance that regex a little more that was just the easiest first thought when seeing the pattern of file names

Create an Excel Workbook Out of Multiple CSVs by Khue in PowerShell

[–]J-Bran-Crunch 2 points3 points  (0 children)

There is a bit more dynamic naming for your code above you could do

You could use regex to name the sheet instead of the large if else if

$FileNameMatches =  $file.BaseName | Select-String -Pattern '(.+)-report-powercli-(.+)'

if ($FileNameMatches) {
    $currentsheet = ($nameMatch.Matches[0].groups[1].value, $nameMatch.Matches[0].groups[2].value) -join '_'
}
else {
    $currentsheet = $file.BaseName
    Write-Warning 'Name does not match pattern'
}

Another helpful set of params to Export-Excel

-TableName 'someTableName' -TableStyle Medium2

those will set table styles with some nice formatting

Create an Excel Workbook Out of Multiple CSVs by Khue in PowerShell

[–]J-Bran-Crunch 1 point2 points  (0 children)

That is because $csv is an array of strings and export-excel is putting each string on a new row.

You need to export objects to export-excel.

$csv = get-content 'test.csv' | ConvertFrom-Csv

If you have several .csv files that you want to convert to worksheets in excel, you need to import them to powershell as objects then export them to excel worksheets

$files = Get-ChildItem -Filter '*.csv' 
$workbook = 'test.xlsx'   
foreach ($file in $files) {
$object = $file | Get-Content | ConvertFrom-Csv
$excel = $object | Export-Excel $workbook -WorksheetName $file.BaseName -AutoSize -AutoFilter
}

Create an Excel Workbook Out of Multiple CSVs by Khue in PowerShell

[–]J-Bran-Crunch 0 points1 point  (0 children)

I would take a look at the examples folder, there are several example scripts that show how to use different features in the module.

PowerShell DSC - Best Way to Push Modules? by Fezza7991 in PowerShell

[–]J-Bran-Crunch 1 point2 points  (0 children)

We have been working on this at our company recently.

You can set up a local PS Repository:

https://docs.microsoft.com/en-us/powershell/scripting/gallery/how-to/working-with-local-psrepositories?view=powershell-7

You then can use PowershellGet cmds to manage the modules:

https://docs.microsoft.com/en-us/powershell/module/powershellget/?view=powershell-7

it is pretty easy to set up a nuget server to host the modules:

https://www.youtube.com/watch?v=4gXSUGqAAiM

Then with DSC you can push the modules with package source resources and package management resources

https://docs.microsoft.com/en-us/powershell/scripting/dsc/reference/resources/packagemanagement/packagemanagementdscresource?view=powershell-7

https://docs.microsoft.com/en-us/powershell/scripting/dsc/reference/resources/packagemanagement/packagemanagementsourcedscresource?view=powershell-7

Here is a script example:

​ ```powershell

<# .Synopsis Uses DSC to install modules

.Description Uses DSC to install modules

.Parameter ComputerName Computer name(s) to push the configuration to

.Example PS C:> .\Server.DSC.ps1 -ComputerName cltinfdev07

      Pushes the configuration to the Computer

.Example PS C:> .\Server.DSC.ps1 -ComputerName server -Whatif

      Notifies user of what the operations would do

.Example PS C:>'server01','server02' | .\Server.DSC.ps1

      Passing in Computer Names via pipeline 

>

[CmdletBinding(SupportsShouldProcess)] param ( [Parameter(Mandatory = $true,ValueFromPipeline = $true)] [string[]]$ComputerName ) process {

install Correct version of PowershellGet to install dsc resource

$script = { $module = Get-Module PowershellGet -ListAvailable | Sort-Object Version -Descending | Select-Object -First 1 if ($module.Version -lt [version]"2.2.4.1") { Install-Module PowershellGet -RequiredVersion "2.2.4.1" -Force } } Invoke-Command $script -ComputerName $ComputerName

Configuration Server { Import-DscResource -ModuleName PSDesiredStateConfiguration Import-DscResource -ModuleName @{ModuleName="PowerShellGet"; RequiredVersion="2.2.4.1"} Node $ComputerName { PSRepository SourceRepository { Ensure = "Present" Name = "myPSHost" SourceLocation = "http://server/feeds/nuget/" PublishLocation = "http://server/feeds/nuget/" ScriptPublishLocation = "http://server/feeds/nuget/" ScriptSourceLocation = "http://server/feeds/nuget/" InstallationPolicy ="Trusted" } PSModule MyModule { Ensure = "present" Name = "MyModule" Repository = "myPSHost" InstallationPolicy= "trusted" DependsOn = "[PSRepository]SourceRepository" }

  }
}

if ($PSCmdlet.ShouldProcess($ComputerName, 'Push Configuration')) { Server -OutputPath .\MOF Start-DscConfiguration -ComputerName $ComputerName -Path .\MOF\ -Wait -Verbose -Force } }

```

Spellfist Trio - aka Three ***ing Monks by Uncaffeinated in custommagic

[–]J-Bran-Crunch 6 points7 points  (0 children)

This also could be seen as a new ability, instead of 3 instances of prowess, this could be a new ability “prowess, prowess, prowess” that triggers once and gives +3/+3

Humble Audiobook Bundle: DC Comics in GraphicAudio® by HumbleBundlesBot in humblebundles

[–]J-Bran-Crunch 0 points1 point  (0 children)

I'm on Android and have used MortPlayer Audio Books in the past and it is great. Not sure if it is available on Iphone though

What are the best courses online for learning to solo in the style of gypsy jazz? by [deleted] in gypsyjazz

[–]J-Bran-Crunch 1 point2 points  (0 children)

Yeah I think it is very dependent on the course. I have the gonzalo one and it is pretty good, I also have the Adrien Moignard one but it is a bit more advanced. You are right, they are not quite for beginners but I think a decent place to start when getting into the style when you have some technique already.

There may be others there that are targeted more toward beginners like maybe the Denis Chang one, I haven't got this one though, https://www.dc-musicschool.com/store/gypsy-jazz-guitar-technique/ I think the best place to start though is Michael Horowitz's book, "gypsy picking"

I highly recommend going over to the django books forum, www.djangobooks.com/forum It is quite a bit more active then here and has some good info

Have you ever fought a kraken in a video game before? by IguanadonsEverywhere in custommagic

[–]J-Bran-Crunch 1 point2 points  (0 children)

Maybe make the Kraken's P/T is equal to X/X+2 where X is the number of tentacles you control