I'm writing a PowerShell script that will execute commands on a remote host using Invoke-Command and its -ScriptBlock parameter. For example, function Foo {
I'm writing a PowerShell script that will execute commands on a remote host using Invoke-Command and its -ScriptBlock parameter. For example, function Foo {
I try to run powershell script from c#. First i set the ExecutionPolicy to Unrestricted and the script is running now from PowerShell ISE. Now this is c# my c
I am trying to write a Powershell script that will read a text file on my desktop that is filled with user names, then go out to a specified folder on our netwo
As the below picture shows, I want to use a PowerShell cmdlet to create/delete domains (folders) under a primary zone in the Windows DNS Server. I've have not b
I am using the powershell code below to get a list of folders and subfolders on a network share. Is it possible to also display the associated security group wi
When you start a new job with Start-Job, you can pass it a ScriptBlock and a InitializationScript for example: Function FOO { Write-Host "HEY" } Start-Job -
On PowerShell, I got the error message when executing tsc. This never happened before. I am not sure should I mingle with the PowerShell security settings to r
I have run the following cmdlet in PowerShell to disable the Password Expiration policy in my M365 tenancy for all users. However, the cmdlet is not applied to
I would like to set up a variable in my code that would ultimately define if I'll see some output or not. "hello" writes to stdout "hello" > $null supresses
Sometimes in my PowerShell scripts, I need access to a specific DLL, using Add-Type -AssemblyName. However, the DLLs I need aren't always on the machine or in t
i want to get the MSI Summary Information with PowerShell i found several scripts and code snippets for opening the "normal" Tables of MSI. So here is my questi
I have started to learn Angular but I note that powershell in Windows gives me an error whenever I make an angular command like: ng new new-app or ng serve
So, I thought that it should be easy enough to A) Export a list of all our Public Folders B) Export a list of all our Public Folders with users who have access
In powershell while converting VM objects to json , ($json = ConvertTo-Json $vm -Compress) i am getting "An item with the same key has already been added" exc
I try the following command from PowerShell (as Administrator) npm install @angular2-material and get the error: Unrecognized token in source text. At line:
How to set the size of Page File on Windows(pagefile.sys) via PowerShell?
This self-answered question tries to address two distinct aspects of dealing with process exit codes in PowerShell: In PowerShell code, how can you query the e
The following works as expected: $values = @( ("a", "b"), ("c", "d") ) foreach($value in $values) { write-host "Value 0 =" $value[0] write-host "Value 1 ="
I want to do some basic validation on a user input in PowerShell to ensure a user can only enter a whole integer and does not enter -7 for example. I am not sur