From d6982c49270f34fa62c29e78ece7d847dd4121b6 Mon Sep 17 00:00:00 2001 From: Kawawete Date: Wed, 27 Nov 2024 17:49:06 +0100 Subject: [PATCH] Command output now goes into variable $RdString --- Intune/Random-PWGen.ps1 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Intune/Random-PWGen.ps1 b/Intune/Random-PWGen.ps1 index a2bab87..f05c753 100644 --- a/Intune/Random-PWGen.ps1 +++ b/Intune/Random-PWGen.ps1 @@ -12,4 +12,6 @@ $Special = Get-Random -Count 5 -InputObject $TokenSet.S $StringSet = $Upper + $Lower + $Number + $Special -(Get-Random -Count 15 -InputObject $StringSet) -join '' \ No newline at end of file +$RdString = (Get-Random -Count 15 -InputObject $StringSet) -join '' + +#You can use now $RdString in your script to make a random password to an AD user or other stuff... \ No newline at end of file