So I'm trying to create a script for the first time in PowerShell, and I was wondering how I could cd into the folder the script just created?
Set-Location -Path G:\Backup
$folderName = (Get-Date).tostring("dd-MM-yyyy-hh-mm-ss")
New-Item -itemType Directory -Name $FolderName
This script will be used to do a fast backup of personal files. So i want the script to create this folder, cd into it and then i'll script it to copy the most important stuff