header image

Archive for September, 2019

Receive-Job Keep parameter

Posted by: | September 29, 2019 Comments Off on Receive-Job Keep parameter |

The Receive-Job Keep parameter is required if you want the data contained in the job to remain available. if you don’t use the –Keep parameter (a switch) the data will be deleted.   Its a pain to remember to use the Keep parameter. I’ve been working with jobs a lot just recently and the number […]

under: PowerShell

PowerShell Day UK 2019 slides and code

Posted by: | September 29, 2019 Comments Off on PowerShell Day UK 2019 slides and code |

Had a great day at PowerShell Day UK 2019. The PowerShell Day UK 2019 slides and code for my session are available at https://github.com/RichardSiddaway/PSDay2019.

under: PowerShell

UK PowerShell day is Saturday

Posted by: | September 26, 2019 Comments Off on UK PowerShell day is Saturday |

The UK PowerShell day is Saturday – 28 September  – two days away. If you want to be there tickets are still available – https://psday.uk/   If you’re going – say hello   See you there

under: PowerShell

Ternary operator

Posted by: | September 25, 2019 Comments Off on Ternary operator |

PowerShell v7 preview 4 adds a Ternary operator to PowerShell.   A ternary operator is a way to provide shortened coding for a simple if-else block. Its an operator that takes three operands rather than the usual two hence the name ternary. for example PS> $a = 5 PS> $b = 3 PS> if ($a […]

under: PowerShell 7

Get-ExecutionPolicy

Posted by: | September 24, 2019 Comments Off on Get-ExecutionPolicy |

I’ve used Get-ExecutionPolicy since PowerShell v1 and never stopped to think about it. The cmdlet normally returns just the current policy PS> Get-ExecutionPolicy RemoteSigned   However, if you dig a little deeper PS> Get-ExecutionPolicy -List Scope ExecutionPolicy —– ————— MachinePolicy Undefined UserPolicy Undefined Process Undefined CurrentUser Undefined LocalMachine RemoteSigned   What you’re seeing is the […]

under: PowerShell

PowerShell v6.2.3

Posted by: | September 17, 2019 Comments Off on PowerShell v6.2.3 |

PowerShell v6.2.3 is available from https://github.com/PowerShell/PowerShell/releases   It fixes a debugging performance issue and updates the .NET SDK and runtime framework version.   Similar fixes are available in v6.1.6 released at the same time

under: PowerShell v6

Hyper-V VM IP address

Posted by: | September 9, 2019 Comments Off on Hyper-V VM IP address |

Saw a question about getting the Hyper-V VM IP address.   One thing with Hyper-V is that the VM has to be running for you to retrieve the IP address.   Once you VM is running you can get the IP address PS> Get-VM -Name W19ND01 | select -ExpandProperty NetworkAdapters | select VMname, Name, IPAddresses […]

under: Hyper-V, PowerShell

Categories