python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
I am unable to get splatting to work with New-ADUser using given and created attributes
I am processing an array of AD User data pulled from one domain to recreate in another. I have created a hash table linking the New-ADUser parameters with the user data imported from a CSV (populated ...

GeoffS
Votes: 0
Answers: 3
How to achieve @args splatting in an advanced function in Powershell?
Consider the following simple function:
function Write-HostIfNotVerbose()
{
if ($VerbosePreference -eq 'SilentlyContinue')
{
Write-Host @args
}
}
And it works fine:
Now I want to...
mark
Votes: 0
Answers: 2
What is the difference between using @ and $ in front of variable in powershell?
I tried to pass the variables to understand the real meaning of the @ and $ in the powershell as :
PS C:\Windows\system32> Write-Host $str
string
PS C:\Windows\system32> Write-Host @str
s t r i ...
Sanjay V
Votes: 0
Answers: 0