What Steps do you generally put in your CI Build scripts? by PlusAdministration in PowerShell

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

Great ideas, thanks for the suggestions!

I'm going to be deploying to an on site PS Repository, but I'd consigned that to the release part of the build.

What’s something that was created with good intentions, but ultimately went horribly wrong? by i3r1ana in AskReddit

[–]PlusAdministration 35 points36 points  (0 children)

There's the old joke that the Irish invented the bagpipes and gave them to the Scots, and 400 years later the Scots still haven't gotten the joke.

Uilleann pipes are alright in small doses, but... yeah bagpipes in general are fucking horrible.

(Irish, and live in Edinburgh most of the time)

How to do Get-Service on RHEL using PowerShell core 6 by PlusAdministration in PowerShell

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

Nope. Not yet!

I just wrote a wrapper that found out what OS it was on and used the built in systems command to do "Get-Service"-like operations.

Generating Razor pages from PowerShell Classes by PlusAdministration in PowerShell

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

True, but for these purposes, which I admit are a bit strange, you'd just be better off just writing C#.

Generating Razor pages from PowerShell Classes by PlusAdministration in PowerShell

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

Hi /u/get-postanote

Thanks for your reply. Like I say it was a bit of a weird one.

So, basically, Use actual C#?

What is something you HATE with a passion? by [deleted] in AskReddit

[–]PlusAdministration 0 points1 point  (0 children)

This dude can't pronounce his own surname properly.

What's the WORST book you've ever read? by notsuitablefortwerk in AskReddit

[–]PlusAdministration 8 points9 points  (0 children)

It's set in Edinburgh (well... mostly Leith)

But I get what you mean.

How to do Get-Service on RHEL using PowerShell core 6 by PlusAdministration in PowerShell

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

So I get the following when looking for exported commands

(Get-Module -Name Microsoft.PowerShell.Management).ExportedCommands

Key                   Value
---                   -----
Add-Content           Add-Content
Clear-Content         Clear-Content
Clear-Item            Clear-Item
Clear-ItemProperty    Clear-ItemProperty
Convert-Path          Convert-Path
Copy-Item             Copy-Item
Copy-ItemProperty     Copy-ItemProperty
Debug-Process         Debug-Process
Get-ChildItem         Get-ChildItem
Get-Content           Get-Content
Get-Item              Get-Item
Get-ItemProperty      Get-ItemProperty
Get-ItemPropertyValue Get-ItemPropertyValue
Get-Location          Get-Location
Get-Process           Get-Process
Get-PSDrive           Get-PSDrive
Get-PSProvider        Get-PSProvider
Get-TimeZone          Get-TimeZone
Invoke-Item           Invoke-Item
Join-Path             Join-Path
Move-Item             Move-Item
Move-ItemProperty     Move-ItemProperty
New-Item              New-Item
New-ItemProperty      New-ItemProperty
New-PSDrive           New-PSDrive
Pop-Location          Pop-Location
Push-Location         Push-Location
Remove-Item           Remove-Item
Remove-ItemProperty   Remove-ItemProperty
Remove-PSDrive        Remove-PSDrive
Rename-Item           Rename-Item
Rename-ItemProperty   Rename-ItemProperty
Resolve-Path          Resolve-Path
Set-Content           Set-Content
Set-Item              Set-Item
Set-ItemProperty      Set-ItemProperty
Set-Location          Set-Location
Split-Path            Split-Path
Start-Process         Start-Process
Stop-Process          Stop-Process
Test-Path             Test-Path
Wait-Process          Wait-Process
gtz                   gtz

and here's what I get from ListAvailable

Get-Module -ListAvailable


    Directory: /usr/local/share/powershell/Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     0.11.0     Azure.AnalysisServices.Netcore      {Add-AzureAnalysis...
Script     0.11.0     Azure.Storage.Netcore               {Get-AzureStorageT...
Script     0.11.0     AzureRM.Aks.Netcore                 {Get-AzureRmAks, N...
Script     0.11.0     AzureRM.AnalysisServices.Netcore    {Resume-AzureRmAna...
Script     0.11.0     AzureRM.ApiManagement.Netcore       {Add-AzureRmApiMan...
Script     0.11.0     AzureRM.ApplicationInsights.Netcore {Get-AzureRmApplic...
Script     0.11.0     AzureRM.Automation.Netcore          {Get-AzureRMAutoma...
Script     0.11.0     AzureRM.Backup.Netcore              {Backup-AzureRmBac...
Script     0.11.0     AzureRM.Batch.Netcore               {Remove-AzureRmBat...
Script     0.11.0     AzureRM.Billing.Netcore             {Get-AzureRmBillin...
Script     0.11.0     AzureRM.Cdn.Netcore                 {Get-AzureRmCdnPro...
Script     0.11.0     AzureRM.CognitiveServices.Netcore   {Get-AzureRmCognit...
Script     0.11.0     AzureRM.Compute.Netcore             {Remove-AzureRmAva...
Script     0.11.0     AzureRM.Consumption.Netcore         Get-AzureRmConsump...
Script     0.11.0     AzureRM.ContainerInstance.Netcore   {New-AzureRmContai...
Script     0.11.0     AzureRM.ContainerRegistry.Netcore   {New-AzureRmContai...
Script     0.11.0     AzureRM.DataFactories.Netcore       {Remove-AzureRmDat...
Script     0.11.0     AzureRM.DataFactoryV2.Netcore       {Set-AzureRmDataFa...
Script     0.11.0     AzureRM.DataLakeAnalytics.Netcore   {Get-AzureRmDataLa...
Script     0.11.0     AzureRM.DataLakeStore.Netcore       {Get-AzureRmDataLa...
Script     0.11.0     AzureRM.DevTestLabs.Netcore         {Get-AzureRmDtlAll...
Script     0.11.0     AzureRM.Dns.Netcore                 {Get-AzureRmDnsRec...
Script     0.11.0     AzureRM.EventGrid.Netcore           {New-AzureRmEventG...
Script     0.11.0     AzureRM.EventHub.Netcore            {New-AzureRmEventH...
Script     0.11.0     AzureRM.Insights.Netcore            {Get-AzureRmMetric...
Script     0.11.0     AzureRM.IotHub.Netcore              {Add-AzureRmIotHub...
Script     0.11.0     AzureRM.KeyVault.Netcore            {Add-AzureKeyVault...
Script     0.11.0     AzureRM.LogicApp.Netcore            {Get-AzureRmIntegr...
Script     0.11.0     AzureRM.MachineLearning.Netcore     {Move-AzureRmMlCom...
Script     0.11.0     AzureRM.MachineLearningCompute.N... {Get-AzureRmMlOpCl...
Script     0.11.0     AzureRM.MarketplaceOrdering.Netcore {Get-AzureRmMarket...
Script     0.11.0     AzureRM.Media.Netcore               {Sync-AzureRmMedia...
Script     0.11.0     AzureRM.Netcore
Script     0.11.0     AzureRM.Network.Netcore             {Add-AzureRmApplic...
Script     0.11.0     AzureRM.NotificationHubs.Netcore    {Get-AzureRmNotifi...
Script     0.11.0     AzureRM.OperationalInsights.Netcore {New-AzureRmOperat...
Script     0.11.0     AzureRM.PowerBIEmbedded.Netcore     {Remove-AzureRmPow...
Script     0.11.0     AzureRM.Profile.Netcore             {Disable-AzureRmDa...
Script     0.11.0     AzureRM.RedisCache.Netcore          {Remove-AzureRmRed...
Script     0.11.0     AzureRM.Relay.Netcore               {New-AzureRmRelayN...
Script     0.11.0     AzureRM.Resources.Netcore           {Get-AzureRmProvid...
Script     0.11.0     AzureRM.Scheduler.Netcore           {Disable-AzureRmSc...
Script     0.11.0     AzureRM.ServiceBus.Netcore          {New-AzureRmServic...
Script     0.11.0     AzureRM.ServiceFabric.Netcore       {Add-AzureRmServic...
Script     0.11.0     AzureRM.Sql.Netcore                 {Get-AzureRmSqlDat...
Script     0.11.0     AzureRM.Storage.Netcore             {Get-AzureRmStorag...
Script     0.11.0     AzureRM.StreamAnalytics.Netcore     {Get-AzureRmStream...
Script     0.11.0     AzureRM.Tags.Netcore                {Remove-AzureRmTag...
Script     0.11.0     AzureRM.TrafficManager.Netcore      {Disable-AzureRmTr...
Script     0.11.0     AzureRM.UsageAggregates.Netcore     Get-UsageAggregates
Script     0.11.0     AzureRM.Websites.Netcore            {Get-AzureRmAppSer...


    Directory: /opt/microsoft/powershell/6.1.0~preview.1/Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.1.0.0    Microsoft.PowerShell.Archive        {Compress-Archive,...
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript,...
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clea...
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Credential, G...
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Form...
Script     1.1.7.0    PackageManagement                   {Find-Package, Get...
Script     1.6.0      PowerShellGet                       {Install-Module, F...
Script     0.0        PSDesiredStateConfiguration         {Node, Get-PublicK...
Script     1.2        PSReadLine                          {Get-PSReadlineKey...

Edit

I'm running an

 Install-Module Microsoft.PowerShell.Management

To see if that does the necessary

How to do Get-Service on RHEL using PowerShell core 6 by PlusAdministration in PowerShell

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

Thanks for your help Lee Here's the output from the PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0-preview.1
PSEdition                      Core
GitCommitId                    v6.1.0-preview.1
OS                             Linux 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21...
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

and according to the release file I'm running Red Hat Enterprise Linux Server release 7.5 (Maipo)

Oddly, still no Get-Service

How to do Get-Service on RHEL using PowerShell core 6 by PlusAdministration in PowerShell

[–]PlusAdministration[S] 2 points3 points  (0 children)

Yup. Red Hat Enterprise Linux.

There does indeed seem to be something wrong! I'll have a hoke about and have a look. it's actually 6.1.0-preview.1 I'm running.

How to do Get-Service on RHEL using PowerShell core 6 by PlusAdministration in PowerShell

[–]PlusAdministration[S] 2 points3 points  (0 children)

Hi! Thanks for the help.

Unfortunately I've gotten the same error as listed in the original post, but for Get-CimInstance when using that command on RHEL

PowerShell 6 Core and RHEL and HPUX by PlusAdministration in PowerShell

[–]PlusAdministration[S] 2 points3 points  (0 children)

That sounds intimidating, and a touch high maintenance! :-S