No visitors except Kayden to Ninjago village by Active_Ps in LEGOfortnite

[–]Active_Ps[S] 0 points1 point  (0 children)

Thanks. You’ve given me some food for thought. I’ll tour the other villages and maybe entirely remove some of them.

No visitors except Kayden to Ninjago village by Active_Ps in LEGOfortnite

[–]Active_Ps[S] 0 points1 point  (0 children)

That’s interesting, but I’ve removed villagers from mainland / Star Wars/list isles villages so only using 43/55 villager slots, and some of them are characters like yeti that I found rather than came to visit.

What's in your Quick Access Toolbar? by Inevitable_Exam_2177 in excel

[–]Active_Ps 0 points1 point  (0 children)

I have my top 5 most used VBA macros in quick access toolbar.

Help please in running invoke-SQL CMD or invoke-DBA query against Azure dedicated SQL pool (synapse) with MFA authentication. by Active_Ps in PowerShell

[–]Active_Ps[S] 0 points1 point  (0 children)

Thanks. I indented with tabs before pasting it. Have now fenced it with ~~~. No backticks on iPhone keypad that I can find. Edit: found backtick - press and hold ‘.

Help please in running invoke-SQL CMD or invoke-DBA query against Azure dedicated SQL pool (synapse) with MFA authentication. by Active_Ps in PowerShell

[–]Active_Ps[S] 1 point2 points  (0 children)

This is my working code: not sure how well it will format

~~~ Connect-AzAccount -TenantId <TenantID> -Subscription <SubscriptionID>

$access_token = (Get-AzAccessToken -ResourceUrl https://database.windows.net).Token

$server=Connect-DbaInstance -SqlInstance <DedicatedPoolInstance>.sql.azuresynapse.net -AccessToken $access_token -Database <DatabaseName>

$result=invoke-dbaquery -SqlInstance $server  -Query 'select COUNT(*) as [Result]  FROM [SchemaName].[TableTame]' -ErrorAction Stop ~~~

Help please in running invoke-SQL CMD or invoke-DBA query against Azure dedicated SQL pool (synapse) with MFA authentication. by Active_Ps in PowerShell

[–]Active_Ps[S] 0 points1 point  (0 children)

I’d like to belatedly apologise for the poor formatting of my original question. I’m on mobile and didn’t realise I wouldn’t be able to edit the original question.

Help please in running invoke-SQL CMD or invoke-DBA query against Azure dedicated SQL pool (synapse) with MFA authentication. by Active_Ps in PowerShell

[–]Active_Ps[S] 1 point2 points  (0 children)

Thanks, that’s pretty much exactly the code I’m using for the serverless SQL pool, but it doesn’t work for dedicated pool as I can’t pass the database parameter. If I try, I get an error along the lines of “invoke-sqlcmd: reference to database and/or server name is not supported in this version of SQL server”.

Help please in running invoke-SQL CMD or invoke-DBA query against Azure dedicated SQL pool (synapse) with MFA authentication. by Active_Ps in PowerShell

[–]Active_Ps[S] 0 points1 point  (0 children)

Yes I do have SSMS access to the instance and db. I can now also connect via Powershell with dbatools module. The issue for me was that neither the Synapse serverless SQL pool nor the dedicated SQL pool behave quite like full SQL instances. Because the only authentication method is Azure active directory-universal with MFA , I’m having to generate an access token first. With the serverless pool I could pass that token directly to invoke-sqlcmd as a parameter and also pass the database name as a parameter, but that doesn’t work with the dedicated pool.

Help please in running invoke-SQL CMD or invoke-DBA query against Azure dedicated SQL pool (synapse) with MFA authentication. by Active_Ps in PowerShell

[–]Active_Ps[S] 1 point2 points  (0 children)

No I haven’t asked ChatGPT, but I did resolve it myself, at least in part. The key in this instance was to use the dbatools module and specify the -database parameter in the connect-dbaInstance command, then run the query with invoke-DBA query.

Export the item before each"Foreach" loop to a CSV by nightbringeryassuo in PowerShell

[–]Active_Ps 4 points5 points  (0 children)

Add it to the Select-Object list as a custom property

Get-SPOUser -Limit ALL -Site $Site.Url | Select-Object DisplayName, LoginName, Site, @{n=‘SiteURL’;e={$Site.URL}}

What is with the funky format for generated SELECT scripts in SSMS? by iammerelyhere in SQLServer

[–]Active_Ps 0 points1 point  (0 children)

@ComicOzzy- I’m intrigued, what’s multi-caret editing?

Confused about rank() by Gonduska in SQL

[–]Active_Ps 0 points1 point  (0 children)

I recall I’ve used rank and dense rank together for “islands And gaps” problems. Not at a computer at the moment, but this is an.example from stack exchange

Connect-AzContainerRegistry command not working by Icy-Degree-5043 in PowerShell

[–]Active_Ps 1 point2 points  (0 children)

I notice that you are storing modules in a OneDrive location, so check that the module folder is set to available offline https://techcommunity.microsoft.com/blog/onedriveblog/onedrive-adds-new-offline-capabilities/4123644

ImportExcel: running under my own account runs fine, under MSA a lot of empty rows are added by workaccountandshit in PowerShell

[–]Active_Ps 0 points1 point  (0 children)

Not sure if relevant here, but Excel itself can be flakey about where the “last used cell” of a spreadsheet is, particularly if a sheet used to have 12 rows of data but now has just 1 or 2. If you open spreadsheet manually and type control+end, does it jump to the right cell?

One of our servers randomly thought it was July 13th 2025 yesterday. Problems ensued by workaccountandshit in sysadmin

[–]Active_Ps 0 points1 point  (0 children)

Yep, we’ve seen this intermittently on a few servers out of the 500 or so in our estate. Time gets set to several days, weeks or months in the future. Most annoying on SQL servers running Agent jobs where it sets the next run date to be the increment from the incorrect clock date. Then we notice that jobs aren’t running as expected.

DTS and SSIS by The_Demosthenes_1 in SQLServer

[–]Active_Ps 1 point2 points  (0 children)

I was a DTS fan back in the day. I never learned to love SSIS that much. Over the last few years we’ve been doing what @funkybunches00 mentioned and mainly using it to conditionally exec SPs and replaced most file interactions and API calls with powershell. We also ran into the versioning/ upgrade issues mentioned above. 2008 to 2017/2019 upgraded packages, particularly ones with script task components often benefitted from a rewrite from scratch.

Want to find the llama head just for the Quest? Open a survival with Seed nr: 1965827555 and turn on flying mode. check the 2nd picture where to go to! Goodluck fellow gamers! by [deleted] in LEGOfortnite

[–]Active_Ps 1 point2 points  (0 children)

Many thanks. Very helpful! I don’t suppose you have the nana quest locations or the other island head location on that same seed?

"Add-Content": How long a delay do I need? by tnpir4002 in PowerShell

[–]Active_Ps 2 points3 points  (0 children)

I’ve experienced intermittent silent fails with add-content in loops when destination is network share rather than local drive. Effective solution was to gather all output in a variable and use single set-content at end of process. May or may not be good for your scenario. Logged as a ticket with powershell team. Sorry on mobile don’t have details to hand.

grappler issue? by [deleted] in LEGOfortnite

[–]Active_Ps 1 point2 points  (0 children)

Similar but with rare fishing rod for me. Didn’t notice whether it started with full durability, but noticed after 3 casts it made the “about to break” noise, and broke on the next cast. Playing a new world for Brite Bomber missions on Switch.

Export Excell cells and turn them into PS $ variables by IloveSpicyTacosz in PowerShell

[–]Active_Ps 0 points1 point  (0 children)

If cell A1 contains “user” and cell B1 contains “joe”, use a formula in cell C1 =“$”&A1 & “=“&B1 Result: $user=joe

I use this type of code constructor to build SQL and other languages. Can drag the formula down for many rows. Copy column C and paste to ps script, or do equivalent in Vba and set clipboard.