Load a specific PSObject

This is difficult to explain, but I will try. I have dozens of psobjects I have written in a script. They have the same properties but with different values. eg: $partner1 = new-object psobject – property @{ firstname = ‘John’ lastname = ‘Doe’ email = ‘jdoe@globalhypermega.net’ folderid = ‘[insert long guid here]’ } I have […]

PowerShell constrained language mode

Hello everyone! We’ve just hired a new CISO and he’s asking about enabling PowerShell constrained language mode org. wide. I’ve done some light reading on the topic and would like to ask the community a few clarifying questions: What’s a good method of implementation across the org.? Would this actually improve our overall security posture? […]

Import-csv to variable property issue

I have a litte issue with the import-csv command and using the content as a variable for test-connection. The example csv looks like this: Computername (header row) localhost i used the ip and hostname to show its not an datatype issue. The not working code looks like this: $pcname=import-csv c:userskrisdesktoptest.csv | % test-connection $pcname […]