Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Tuesday, October 4, 2016 4:00 AM
I create the powershell script to enable volume shadown copy (VSS) in computer/user configuration (GPO).
1)Execution policy is unrestricted, and the script runs fine when ran manually (run as administration) in Windows 10 .
2)I created a group policy (Computer Configuration/ User Configuration > Windows Settings > Scripts > Startup) Added EnableVSS.ps1 to \domain.com\SysVol\domain.com\Policies...\Machine\Scripts\Startup.
3)Security Filtering configured to apply to the Domain Computers group.
4)Policy applies fine to computer.
I apply GPO to run below script.
vssadmin resize shadowstorage /for=C: /on=C: /maxsize=8128MB
vssadmin resize shadowstorage /for=D: /on=D: /maxsize=8128MB
vssadmin resize shadowstorage /for=E: /on=E: /maxsize=8128MB
# get static method
$class=[WMICLASS]"root\cimv2:win32_shadowcopy"
# create a new shadow copy
"Creating a new shadow copy"
$class.create("C:\, "ClientAccessible")
$class.create("D:\, "ClientAccessible")
$class.create("E:\, "ClientAccessible")
I get the following error when the policy attempts to apply script:
Group Policy event 1130
Login script failed.
GPO Name : EnableVSS
GPO FileSystemPath: \\domain.com\SysVol\domain.com\Policies\{...}\User
ScriptName:EnableVSS.ps1SupportInfo1 0
SupportInfo2 0
ErrorCode 267
ErrorDescription The directory name is invalid.
Any help would be appreciated.
Extra info. I'm testing this GPO on a windows 10 machine. This script is applied on a server 2008.
All replies (3)
Wednesday, October 5, 2016 6:25 AM ✅Answered
Thank you John,
I found out my solution, it needs to ensure that user account/ computer account has the proper file permissions to read and run the script. PowerShell means user/computer must has the admin permissions to run. It is impossible. It is very important to adminstrator to do it.
Tuesday, October 4, 2016 4:23 AM
You should post Group Policy issues in the GP forum.
My first reaction is that you cannot alter VSS in a startup script.
\(ツ)_/
Tuesday, October 4, 2016 9:46 PM
You may want to look at a similar post here regarding access to the script itself as the possible cause.